If I comment the arabic
polyglossia option as below, there is no error. Otherwise, the document won't even compile if I want a Table of Contents.
\documentclass[twocolumn,twoside,titleauthor]{ycbook}
\usepackage{fontspec,polyglossia}
%weird toc problem in twoside mode in mwbk
\makeatletter
\renewcommand*\chapter@toc{%
\ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}\fi
\addcontentsline{toc}{chapter}{%
\ifHeadingNumbered
\mw@seccntformat{\@chapapp\ \thechapter}%
\fi
\HeadingTOCText}}%
\makeatother
\setmainlanguage{english}
%\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits]{Amiri}
\begin{document}
\tableofcontents
\chapter{Test}
\end{document}