Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate warning message into biber log (.blg) #486

Open
matteofg opened this issue Nov 6, 2024 · 2 comments
Open

Duplicate warning message into biber log (.blg) #486

matteofg opened this issue Nov 6, 2024 · 2 comments

Comments

@matteofg
Copy link

matteofg commented Nov 6, 2024

I set a personal datamodel to define a mandatory field. Below a mwe:

\begin{filecontents}[overwrite]{\jobname.bib}
@customa{a,
  author = {Author},
  %title = {Title}, % mandatory field
}
\end{filecontents}

\begin{filecontents}[overwrite]{\jobname.dbx}
\DeclareDatamodelEntrytypes{customa}

\DeclareDatamodelEntryfields[customa]{author, title}

\DeclareDatamodelConstraints[customa]{
  \constraint[type=mandatory]{
    \constraintfield{title}
  }
}
\end{filecontents}

\documentclass{article}
\usepackage[datamodel=\jobname]{biblatex}
\addbibresource{\jobname.bib}

\DeclareBibliographyDriver{customa}{%
  \usebibmacro{author}%
  \newunit\newblock
  \usebibmacro{title}%
  \usebibmacro{finentry}}

\begin{document}
\cite{a}
\printbibliography
\end{document}

Note that I commented the mandatory field title.
Running biber --validate-datamodel the same warning message appears twice in the .blg file:

WARN - Datamodel: customa entry 'a' (test.bib): Missing mandatory field 'title'
WARN - Datamodel: customa entry 'a' (test.bib): Missing mandatory field 'title'
INFO - WARNINGS: 2

Why does biber recognize two warnings (instead of one)?

plk added a commit that referenced this issue Nov 7, 2024
@plk
Copy link
Owner

plk commented Nov 7, 2024

Please try the development of biber from Sourceforge.

@matteofg
Copy link
Author

matteofg commented Nov 8, 2024

The fix works correctly. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants