# How to remove weird errors occurring while using tikz package?

I used the tikz package to make two flowcharts in an article. I was using Overleaf online Latex editor. The flowcharts were done without any problem. However, two errors are appearing after recompiling. I am attaching the pictures of those error descriptions. I tried to find where the error is coming from by removing parts of my code one by one and finally found that whenever I introduce the \usepackage{tikz} line, these two errors start to appear.

This problem doesn't persist if I use 'article' as documentclass. The class file (provided by the journal) I am using can be downloaded from here: Class File. I am writing a MWE below:

\documentclass{jaa}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{positioning}
%defining the style for flowchart
\tikzset{io/.style={trapezium, trapezium left angle=80, trapezium right angle=100,
minimum width=6em, minimum height=3em, text centered, draw=black, fill=blue!00},
process/.style={rectangle, minimum width=6em, minimum height=4.25em,
text centered, draw=black, fill=orange!00,inner xsep=1ex},
arrow/.style={thick,->,>=stealth}}

\begin{document}\sloppy
\title{Title of the paper goes here:\\ Second line}

\author{AUTHOR1\textsuperscript{1}, AUTHOR2\textsuperscript{1} and AUTHOR3\textsuperscript{2,*}}
\affilOne{\textsuperscript{1}Department of P, University X, Place Pincode, Country.\\}
\affilTwo{\textsuperscript{2}Department of Q, University Z, Place Pincode, Country.}

\twocolumn[{
\maketitle

\begin{abstract}
Abstract text goes here.  Abstract text goes here.
Abstract text goes here.  Abstract text goes here.
Abstract text goes here.
Abstract text goes here.  Abstract text goes here.
\end{abstract}
\keywords{------}
}]
\section{Introduction}
\end{document}


Although these two errors are not creating major problems in Overleaf, when I try to submit the TeX code to the journal, there the in-built compiler of that website can not compile the code (It was mentioned to be pdfTeX). Would anyone please explain why this error is coming and is there any way to overcome this? Thanks in advance.

The class redefines the primitive \year and this breaks tikz. Complain to the maintainer of the class, they shouldn't do this. As a work around you can reinstate the original meaning:

\let\oriyear\year
\documentclass{jaa}
\let\year\oriyear

• @Ulrike Fischer. Thanks a lot. This worked perfectly and removed the errors that were showing up in Overleaf. I had no idea about the primitives before. I would google this to know more about these. I haven't tried to compile the code with the in-built pdfTeX of the website yet. I would post comment about the progress soon. – Wave_Rider03 Jul 22 at 12:47
• Adding to my previous comment: After adding those two lines of code, the entire code compiled properly in the in-built pdfTeX of the journal website. – Wave_Rider03 Jul 22 at 16:41