Error message: the literal stack isn't empty for entry XXX

I am struggling with an error message that I don't understand:

---the literal stack isn't empty for entry ladershortgershuny while executing---line 5227 of file apacite.bst (There was 1 error message)

So far there was not a problem in my PDF file (the citation worked: it was cited in the text correctly and the article was listed in the bibliography.

But now I am trying to include new sources and because of this error, the won't work and show up like this in the PDF: "..grew up with their fathers present (?, ?)."

Does anyone know what is going wrong here and how I could solve the problem?

This is the .bib entry for ladershortgershuny

@webpage{ladershortgershuny,
Author = {Deborah Lader and Sandra Short and Jonathan Gershuny},
Date-Modified = {2015-11-28 21:19:53 +0000},
Lastchecked = {8 October 2015},
Month = {August},
Year = {2006},


Minimal Example:

\documentclass[11pt,a4paper] {article}
\usepackage{apacite}
% lots of other packages

\begin{document}

XXX \footnote {XXX \citeyear{ladershortgershuny} XXX }.

\bibliographystyle{apacite}

% Lots more text, figures, tables and a bibliography
\end{document}

• Can you show a minimal example of code? Particularly interesting is the ladershortgershuny entry and, maybe, the one preceding it in the .bib file. Jan 2 '16 at 17:05
• Most likely, your database has a malicious entry. But we need to see a MWE to be sure. Jan 2 '16 at 17:05
• @egreg Thank you for your fast response. As I am relatively new to LaTeX, I hope that I understood your questions right. I added the .bib entry for ladershortgershuny in my main question. I made a separate .bib file for each source. Do you need something else or do you mean this by minimal example of code? Jan 2 '16 at 17:09
• @Johannes_B see above:) Jan 2 '16 at 17:10
• Your entry has no title, and so the url triggers the error (imho a bug in apacite.bst). Jan 2 '16 at 17:50

This error fundamentally happens because your entry in *.bib contains data that are not being written to your *.bbl file by your *.bst file. The stack contents should appear in your *.blg file (starting on a new line after stack=), allowing you to see which items weren't written. It can be resolved by editing the bst file so it writes everything, or by changing the data in the bib file so that bst will write everything. It seems that this can be done by adding fields OR removing fields in the bib entry. I suspect that the rules for removing data from the stack may depend on other data; that is, the code for popping "pages" off of the stack might be locked inside an if statement for processing some other data that doesn't get executed if I'm missing a field that's related to pages.
I came across the same problem, and find if I would neglect title, then would be error even on author items.