# LaTeX PDF shows (author n.d.) even though the .bib file shows the year

So, I have a problem. I exported my .bib file from Mendeley and apart from some minor problems it has worked fine. Until now. I'm pretty sure this problem has just ocurred, otherwise I would have noticed it sooner. So. I used \citep{} to cite in my file using the author year format. The entries in the .bib file contain all the information needed, but once I want to cite it in my text, I get (author n.d.) which means "no date". For example, below is the .bib entry for Wurm2004, the year is present. Underneath is the .bbl entry for the same article. The year is missing. I tried compiling it a lot of times and also tried to manually change the year entry in the .bbl file. Nothing changed. If this question has already been asked please dircet me to it, I couldn't find anything.

@article{Wurm2004,
author = {Wurm, Florian M.},
doi = {10.1038/nbt1026},
file = {:C$\backslash$:/Users/sille/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Unknown - Unknown - R E V I E W.pdf:pdf},
journal = {Nature Biotechnology},
number = {11},
pages = {393--398},
title = {{Production of recombinant protein therapeutics in cultivated mammalian cells}},
url = {https://doi.org/10.1038/nbt1026}
volume = {22},
year = {2004}
}

\harvarditem{Wurm}{n.d.}{Wurm2004}
Wurm, F.~M.  \harvardyearleft n.d.\harvardyearright , {Production of
recombinant protein therapeutics in cultivated mammalian cells}', {\em Nature
Biotechnology} (11),~393--398.
\newline\harvardurl{https://doi.org/10.1038/nbt1026}


I use

\usepackage{natbib}
\bibliography{Mendeley}
\bibliographystyle{agsm}

• Looks like a comma between url and volume is missing. – Sergei Golovan Aug 8 '17 at 19:36
• Please help us help you and add a minimal working example (MWE) (in this case, a minimal working example with bibliography (MWEB)) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – gusbrs Aug 9 '17 at 9:59

After adding a missing , after url = {https://doi.org/10.1038/nbt1026} the following MWE compiles without error(s) and only one warning (caused by package filecontents, which is okay):

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Goossens,
author    = {Goossens, Michel and Mittelbach, Frank and
Samarin, Alexander},
title     = {The LaTeX Companion},
edition   = {1},
year      = {1994},
}
title     = {The Restaurant at the End of the Universe},
series    = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year      = {1980},
}
@article{Wurm2004,
author = {Wurm, Florian M.},
doi = {10.1038/nbt1026},
file = {:C$\backslash$:/Users/sille/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Unknown - Unknown - R E V I E W.pdf:pdf},
journal = {Nature Biotechnology},
number = {11},
pages = {393--398},
title = {{Production of recombinant protein therapeutics in cultivated mammalian cells}},
url = {https://doi.org/10.1038/nbt1026},
volume = {22},
year = {2004}
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{natbib}

\begin{document}

test \citep{Wurm2004} test

\nocite{*}
\bibliographystyle{agsm}
\bibliography{\jobname}

\end{document}
`

It results in the wanted output: