pgfplots issues with fillbetween

With this example document

\documentclass[tikz,12pt]{standalone}

\usepackage{tikz,pgfplots}
\usepackage{pgfplotstable}
\usepgfplotslibrary{fillbetween}

\pgfplotsset{compat=1.12}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
% error bars/y dir=both,
error bars/y explicit,
]

\end{axis}
\end{tikzpicture}

\end{document}


the output looks as expected:

If I additionally add more data and enable the error bars/y dir=both the example fails to compile. Is this a bug or am I doing something wrong?

• This is a bug, thanks for the report. I will take a note on my todo list. A workaround could be to plot the same plot twice, once without error bar (but with name path) and once only with the error bar. – Christian Feuersänger Dec 3 '15 at 16:56

This is a bug. Thanks to your report, I have identified and fixed it; will become part of pgfplots 1.13.

A workaround is to draw the path twice, once with name path and without error bars and once without name path but with error bars:

\documentclass{standalone}

\usepackage{tikz,pgfplots}
\usepackage{pgfplotstable}
\usepgfplotslibrary{fillbetween}

\pgfplotsset{compat=1.12}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
error bars/y dir=both,
error bars/y fixed=1,
]