[Tex/LaTex] Ignore a bibliography field [e.g. “urldate”] for eliminating of biblatex/biber warnings

biberbiblatexwarnings

I have a large bibliography generated by a reference manager program (Citavi, but it can be anything else). The urldate field of all references is formatted as urldate = {dd.mm.yyyy}, which is not correct for biblatex. However, I don't want to change this field every time I update my HUGE bibliography from the reference manager app.
In fact, I receive no errors but many warnings like one below.

Package biblatex Warning: Biber reported the following issues
(biblatex) with 'XYZ.2003':
(biblatex) - Datamodel: Entry 'XYZ.2003' (bibliographie.bib)
: Invalid format '18.11.2013' of date field 'urldate' - ignoring.

I don't want to have these warning, since for many bibliography entries this type of warning will dominate and it will be hard to see the relevant warnings.

I.e. these warnings need to be somehow suppressed

For comleteness (partially using the example Find unused bibkeys using biblatex),

\begin{filecontents*}{bibliograp.bib}
@BOOK{Ab_Steg,
author = "M. Abramowitz and I. A. Stegun",
title = {Handbook of mathematical functions},
publisher = "Dover publications",
year = "1965",
urldate = {15.10.2013},
language="English" }
\end{filecontents*}

\documentclass[11pt,onecolumn,twoside]{scrbook}  
\usepackage[style=numeric-comp,
        backend=biber,      
        date=short,
        firstinits=true,
    language=english]{biblatex}
\AtEveryBibitem{\clearlist{urldate}}
\AtEveryBibitem{\clearlist{abstract}}
\addbibresource[datatype=bibtex]{bibliograp.bib}

\begin{document}
hello world \cite{Ab_Steg}
\printbibliography
\end{document}

As it can be seen, \AtEveryBibitem{\clearlist{urldate}} doesn't prevent the warnings. I also expected that language=german (i.e. go away from the English date standard) in biblatex options could resolve the issue, but it also doesn't help.

Best Answer

biblatex rightly warns you about a not well-formed field format, so the best solution is to do away with that and use the proper date format yyyy-mm-dd; since you use a citation manager that should be as easy as telling the citation manager to export the date properly (I have no idea how hard that actually is.).

Since you do not want to do this - and since you do not need the urldate field anyway, one solution is to just do away with the field \AtEveryBibitem{\clearfield{urlyear}}, but this of course still issues warnings, because, technically, biber is still processing the field (and still notices it is not well-formed). Note that you don't use \clearfield{urldate} here, because biblatex decomposes date fields into their year, month and day parts - it is enough to delete the year to suppress the output of the field.

To get rid of the errors, we need to prevent biber from seeing the bad field, so we just add

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=true]{
      \step[fieldset=urldate, null]
    }
  }
}

to our preamble. This will tell biber to discard the urldate field without even properly looking at it.

In my test run this MWE did not complain at all

\begin{filecontents*}{bibliograp.bib}
@BOOK{Ab_Steg,
author = "M. Abramowitz and I. A. Stegun",
title = {Handbook of mathematical functions},
publisher = "Dover publications",
year = "1965",
urldate = {15.10.2013},
language="English" }
\end{filecontents*}

\documentclass[11pt,onecolumn,twoside]{scrbook}  
\usepackage[style=numeric-comp,
        backend=biber,      
        date=short,
        firstinits=true,
    language=english]{biblatex}
\AtEveryBibitem{\clearlist{abstract}}
\addbibresource[datatype=bibtex]{bibliograp.bib}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=true]{
      \step[fieldset=urldate, null]
    }
  }
}

\begin{document}
hello world \cite{Ab_Steg}
\printbibliography
\end{document}

One positive effect is that you can get rid of \AtEveryBibitem{\clearfield{urlyear} since that field is ignored further down the road (assuming we're travelling uphill here).

Related Question