I want to add a subchapter sectioning level, between chapter and section.
I use the \titleclass command from titlesec package.
According to titlesec documentation, \titleclass{\subchapter}{straight}[\chapter] should set the level of subchapter to 1, and increase by 1 the levels below (section of level 2, subsection of level 3, etc).
However, the following example :
\documentclass{book}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\usepackage{titletoc}
\titleclass{\subchapter}{straight}[\chapter]
\newcounter{subchapter}
\titleformat{\subchapter}[block]{}{}{0pt}{}
\titlespacing{\subchapter}{1pc}{*4}{*2.3}
\titlecontents{subchapter}[1.5em]{}{}{\hspace*{-2.3em}}{\titlerule*[0.75pc]{.}\contentspage} %bad formatting, but only here to produce a content line in ToC
\begin{document}
\setcounter{tocdepth}{1}
\tableofcontents
\chapter{Chapter one}
\subchapter{Subchapter one}
\section{Section one}
\subsection{A subsection}
\section{Section two}
\end{document}
produces a ToC showing both subchapter and section, meaning that the level of section is still equal to 1.
I also tried to add
\makeatletter
\def\toclevel@section{2}
\makeatother
as suggested in How to add an extra level of sections with headings below \subsubsection, but it does nothing.
What am I missing?
Note that for now, I do not care about the formatting of the ToC and can manage this by myself later, I am only interested in the levels of the different sectioning titles.



