[Tex/LaTex] minitoc does not displayed for some chapters

minitoc

In a report file, I have 5 chapters, the minitoc disappeared in just the first 3 of them after adding the list of axamples and the one for algorithms

\documentclass[12pt,a4paper,oneside]{report}
%packages for algorithm
\usepackage{algorithm}
\usepackage{algpseudocode}
%packages for example environment
\usepackage[most]{tcolorbox}
\usepackage{xparse}
\newcounter{example}
\NewDocumentEnvironment{example}{ O{} } {
      \colorlet{colexam}{gray}
      \newtcolorbox[use counter=example,list inside=qex]{examplebox}{%
      % Example Frame Start
      % Empty previously set parameters
      empty,
      % use \thetcbcounter to access the example counter text
      title={Exemple \thetcbcounter : #1},
      % Attaching a box requires an overlay
      attach boxed title to top left,
      % (boxed title style requires an overlay)
      boxed title style={empty,size=minimal,toprule=0pt,top=4pt,overlay={}},
      coltitle=colexam,fonttitle=\bfseries, before=\par\medskip\noindent,parbox=false,boxsep=0pt,left=0pt,right=3mm,top=2pt,breakable,pad at break=0mm,
before upper=\csname @totalleftmargin\endcsname0pt, % Use instead of parbox=true. This ensures parskip is inherited by box.
% Handles box when it exists on one page only
overlay unbroken={\draw[colexam,line width=.5pt] ([xshift=-10pt]title.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: first page
overlay first={\draw[colexam,line width=.5pt] ([xshift=-10pt]title.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: middle page
overlay middle={\draw[colexam,line width=.5pt] ([xshift=-10pt]frame.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: last page
overlay last={\draw[colexam,line width=.5pt] ([xshift=-10pt]frame.north west) -- ([xshift=-10pt]frame.south west); },%
}
\begin{examplebox}}
{\end{examplebox}\endlist}

\usepackage{minitoc} 
\mtcselectlanguage{french}
\dominitoc
\dominilot
\dominilof

\begin{document}
\tableofcontents 

\listoffigures \addcontentsline{toc}{chapter}{Table des Figures}\mtcaddchapter 

\listoftables \addcontentsline{toc}{chapter}{Liste des Tableaux}\mtcaddchapter 

%examples environment list
\newpage
\tcblistof[\chapter*]{qex}{Liste des Exemples}
\addcontentsline{toc}{chapter}{Liste des Exemples}

%algorithms list
\listofalgorithms 
\addcontentsline{toc}{chapter}{Liste des Algorithmes}

\chapter{Les Courbes Elliptiques}
\minitoc\newpage
\section{section1}
\section{section2}

\end{document}

I do not have any error message but some warnings
enter image description here

thanks for help.

Best Answer

Solution found by replacing the instruction \addcontentsline with \mtcaddchapter for all the lists

\tcblistof[\chapter*]{qex}{Liste des Exemples} \mtcaddchapter[Liste des Exemples]
\listofalgorithms \mtcaddchapter[Liste des Algorithmes]