[Tex/LaTex] Multiple Footnotes in the same caption/figure/table/equation and using hyperref

pdftex

In need multiple footnotes in the caption of figures and tables and in tabular environments together with the package hyperref.

%LaTeX=>PDF
\documentclass{report}

\usepackage{tablefootnote}
\usepackage{hyperref}

\begin{document}
\begin{figure}[htb]
\caption[123]{A\footnote{\label{first}some footnote}B\tablefootnote{4}
X\footnotemark{} Y\footnotemark{} Z\footnotemark{}}
\end{figure}
 \addtocounter{footnote}{-3} %3=n
 \stepcounter{footnote}\footnotetext{a}
 \stepcounter{footnote}\footnotetext{b}
 \stepcounter{footnote}\footnotetext{c}
\end{document}

I get two different warnings:

pdfTeX warning (ext4): destination with the same identifier (name{Hfootnote. }) has been already used, duplicate ignored

and

pdfTeX warning (dest): name{Hfootnote. } has been referenced but does not exist, replaced by a fixed one

result

I tried

and several others but my problem seems to be more complicated than those, because I need multiple footnotes in combination with hyperref.

===================================================

I tried

%LaTeX=>PDF
\documentclass{report}
\usepackage{hyperref}
\begin{document}
\begin{figure}\caption[123 456]{123\footnotemark 456\footnotemark}
\end{figure}
\addtocounter{footnote}{-1}
\footnotetext{\href{https://tex.stackexchange.com/}{stackexchange}}
\stepcounter{footnote}\footnotetext{\href{https://en.wikipedia.org/wiki/User_talk:JoKalliauer}{https://en.wikipedia.org/wiki/User\_talk:JoKalliauer}}
\end{document}

and

%LaTeX=>PDF
\documentclass{report}
\usepackage{hyperref}
\usepackage{tablefootnote}
\begin{document}
\begin{figure}\caption[123 456]{123\tablefootnote{\href{https://tex.stackexchange.com/}{stackexchange}} 456\tablefootnote{34}}
\end{figure}
\end{document}

but also those lead to the same problem.

Best Answer

The Solution can be found in https://tex.stackexchange.com/a/440559/110064 (by @jesseknight): basically use https://ctan.org/pkg/footnotehyper

\usepackage{footnotehyper}