Using Gauss' law, an idealisation of infinitely large plates and symmetry arguments one can show that the electric field of a parallel plate capacitor vanishes outside the plates and is constant between them.
Let us assume that one plate lies on the $xy$-plane, the other a distance $d$ above it (ie. at $z=d$).
Using the fact that the negative gradient of the electric potential equals the electric field, after integrating one finds that the potential between the plates is linearly dependant on $z$ plus an integration constant, say $c_2$. Outside it is constant (say with $c_1$ for $z>d$ and $c_3$ for $z<0$).
I read quite often in textbooks that after integrating a conservative vector field, we can explicitly calculate the integration constants by using the boundary conditions that come from the continuity of the potential and the fact that the potential vanishes at infinity.
When we apply this concept to the parallel plate capacitor however, it results in a contradiction; namely the only solution satisfying the conditions is the zero potential on the whole space, but then the electric field in turn must be zero everywhere.
I don't seem to be able to find the cause of this contradiction: does it come to existence by the idealisation argumentation, or can't we always say that the scalar potential of a conservative vector field must be continuous everywhere?
It seems that the argumentations above work perfectly fine for spherical and cylindrical capacitors, which makes me even more perplex.
Thanks for any insight!