Q:

Two footnotes in a heading, only one is displayed at the end of the page

I'm adding two footnotes to a section heading:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}

\usepackage[stable]{footmisc}

\usepackage{titlesec}

\begin{document}
\section{test
\footnote{This is footnote no1.} 
\footnote{This is footnote no2.} 
}
\lipsum[4]
\end{document}

The heading will have both of the footnotes, but at the end of the page only the second is displayed. 
The problem appears to be \usepackage{titlesec}, because it works fine without it. 

Stuff I specified in \usepackage{titlesec}:
\renewcommand\thesection{\arabic{section}} 
\renewcommand\thesubsection{\arabic{subsection}} 
\renewcommand\thesubsubsection{\arabic{subsubsection}} 
\titleformat{\section}[block]{\Large\scshape\centering}{\thesection}{1em}{} 
\titleformat{\subsection}[block]{\large\scshape}{\thesection.\thesubsection}{1em}{} 
\titleformat{\subsubsection}[block]{\large\scshape}{\thesection.\thesubsection.\thesubsubsection}{1em}{}

Thanks in advance! 

A:

The titlesec package redefines \footnote when processing a sectional title in such a way as to store the footnote text in a save bin (called \ttl@fn).  A second footnote overwrites the contents of this storage bin, so in the end you only get the last footnote. 
A workaround is to use the \footnotemark and \footnotetext mechanism just for the cases (rare, I hope) when you need two footnotes.  My advice is of never using footnotes in titles. 
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[stable]{footmisc}
\usepackage{titlesec}
\usepackage{lipsum}

\renewcommand\thesection{\arabic{section}} 
\renewcommand\thesubsection{\arabic{subsection}} 
\renewcommand\thesubsubsection{\arabic{subsubsection}} 

\titleformat{\section}[block]
  {\Large\scshape\centering}
  {\thesection}
  {1em}
  {} 
\titleformat{\subsection}[block]
  {\large\scshape}
  {\thesection.\thesubsection}
  {1em}
  {} 
\titleformat{\subsubsection}[block]
  {\large\scshape}
  {\thesection.\thesubsection.\thesubsubsection}
  {1em}
  {}

\begin{document}

\section[test]{test\footnotemark\ \footnotemark}
\addtocounter{footnote}{-1}\footnotetext{This is footnote no1.} 
\addtocounter{footnote}{1}\footnotetext{This is footnote no2.} 

\lipsum[4]

\end{document}

Don't forget the optional argument without the footnotes, or they will also appear in the table of contents and in the headings. 

Note The image has been produced by reducing the text height

