I have run into what looks like a macro expansion issue. Consider the following example:
\documentclass{article}
\usepackage{hyperref}
\usepackage{biblatex}
\begin{filecontents}{expprob.bib}
@online{example,
shorthand = {foo-bar},
url = {http://example.com}
}
\end{filecontents}
\bibliography{expprob}
\newcommand{\demofield}[2]{foo-#1}
\newcommand{\demourl}[1]{\url{http://example.com/link/\demofield{#1}{shorthand}}}
\newcommand{\biburl}[1]{\url{http://example.com/link/\citefield{#1}{shorthand}}}
\begin{document}
\textbf{without biblatex}
expected: \url{http://example.com/link/foo-bar}
actual: \demourl{bar}
\textbf{with biblatex}
ze field: \citefield{example}{shorthand}
expected: \url{http://example.com/link/foo-bar}
actual: \biburl{example}
\end{document}
The commands \demourl and \biburl are quite similar, they just use different macros to determine a part of the URL. Processing this file (e. g. with latexmk) yields the following result:

As you can see, the \citefield command works correctly and retrieves the contents of the shorthand attribute. The problem is that the macro is not expanded within \url, while the apparently similar \demofield is expanded correctly. I don't understand this - what is happening here, and how do I get the system to expand \citefield as well?
\citefieldis a\protectedcommand, so it doesn't get expanded in an\edef. – egreg Jul 12 '14 at 10:56\tracingmacros=1,\citefieldhas better be a\protectedcommand.;-)– egreg Jul 12 '14 at 11:11