How To Cite block not showing when a custom table of content is enabled in OJS 3.5

Describe the issue or problem
Some of our journals are displaying the full text of their articles in HTML on their landing page, and we have added a table of contents that is displayed under the galleys on the side. To generate the HTML, we use the JATSParser plugin. To display the table of contents, we created a child theme for the default theme and added a JavaScript file as well as modified article_details.tpl.

In the process of upgrading from version 3.3 to version 3.5, we realized in testing that if we display the table of contents, the How To Cite block from the Citation Style Language plugin would disappear.

Is there a reason why it would disappear? Is there a way to display both the custom table of contents and the How To Cite block like we could in OJS 3.3?

Steps I took leading up to the issue

  1. Enable Citation Style Language plugin
  2. How to Cite block displays on the article landing page
  3. Enable JATSParser plugin and custom default child theme plugin
  4. Table of contents displays, but the how to cite block does not

What application are you using?
OJS 3.5.0-1

Additional information
Exemple in OJS 3.3 : Sedimentologika
Exemple in OJS 3.5 : Sedimentologika

Custom child theme (parent : Default)
\templates\frontend\objects\article_details.tpl
line 317 - added the following code

{* Dynamic Table of content *}
<div class="jatsParser__intraarticle-menu">
	<div id="jatsParser__navbar-article" class="jatsParser__navbar">
		<nav class="jatsParser__navbar-items" id="jatsParser__navbarItems">
			{* adding menu by javascript here *}
		</nav>
	</div>
</div><!-- End JATS ajout MC 24-08-2022 -->

\js\main.js


// Navigation inside an article

(function () {
	var navbar = document.getElementById("jatsParser__navbarItems");
	var sectionTitles = document.getElementsByClassName("article-section-title");
	
	var hasSubtitles = 0;
	var intranav;

	if (sectionTitles.length < 2) {
		var elTodelete = document.querySelector(".jatsParser__intraarticle-menu");
		elTodelete.parentNode.removeChild(elTodelete);
		return;
	}

	for (var i = 0; i < sectionTitles.length; i++) {
		var sectionTitle = sectionTitles.item(i);
		
		if (sectionTitle.tagName === "H2") {
			sectionTitle.setAttribute("id", "title-" + i);
			var newNavItem = document.createElement("A");
			newNavItem.setAttribute("class", "jatsParser__nav-link");
			newNavItem.setAttribute("href", "#title-" + i);
			var newNavItemText = document.createTextNode(sectionTitle.textContent);
			newNavItem.appendChild(newNavItemText);
			navbar.appendChild(newNavItem);
			hasSubtitles = 0;
		} else if (sectionTitle.tagName === "H3") {
			hasSubtitles++;
			sectionTitle.setAttribute("id", "title-" + i);
			
			if (hasSubtitles === 1) {
				intranav = document.createElement("NAV");
				intranav.setAttribute("class", "jatsParser__subnavbar-items");
				navbar.appendChild(intranav);
			}
			
			var newSubNavItem = document.createElement("A");
			newSubNavItem.setAttribute("class", "jatsParser__subnav-link");
			newSubNavItem.setAttribute("href", "#title-" + i);
			var newSubNavItemText = document.createTextNode(sectionTitle.textContent);
			newSubNavItem.appendChild(newSubNavItemText);
			intranav.appendChild(newSubNavItem);

		} 

	}
	
})();



// ScrollSpy

(function () {
	
	function trackElement(headLvl, navLvl) {
		
		// Sections position
		var sectionTitles = document.getElementsByClassName("article-section-title");
		var arrayReturn = sectionTitlePos(sectionTitles, headLvl);
		var closestToZeroElement = arrayReturn[0];
		var minimum = arrayReturn[1];
		
		var navItems = document.getElementsByClassName(navLvl);
		
		if (closestToZeroElement != null) {
			var closestToZeroElementId = closestToZeroElement.getAttribute("id");
			
			for (var y = 0; y < navItems.length; y++) {
				var navItem = navItems.item(y);
				
				var linkTo = navItem.getAttribute("href").trim().substr(1);
				if (linkTo === closestToZeroElementId) {
					
					// Remove highlight from the last subheading if next heading is reached
					if (headLvl === "H3" && !isParentActive(navItem)) {
						if (navItem.classList.contains("active")) {
							navItem.classList.remove("active");
						}
					}
					
					if (navItem.classList.contains("active")) {
						return;
					}
				}
				
				if (navItem.classList.contains("active")) {
					navItem.classList.remove("active");
				}
				
				// Add highlight except to subheadings from different sections
				if (linkTo === closestToZeroElementId) {
					if (headLvl !== "H3" || isParentActive(navItem)) {
						navItem.classList.add("active");
					}
				}
			}
			
		} else if (minimum === 1) {
			for (var z = 0; z < navItems.length; z++) {
				if (navItems.item(z).classList.contains("active")) {
					navItems.item(z).classList.remove("active");
				}
			}
		}
		
	}
	
	/* do not trigger scroll listening too often */
	var ticking = false;
	
	window.addEventListener("scroll", function(e) {
		
		if (!ticking) {
			window.setTimeout(function() {
				trackElement("H2", "jatsParser__nav-link");
				trackElement("H3", "jatsParser__subnav-link");
				ticking = false;
			}, 500);
			
			ticking = true;
		}
	});
	
	function sectionTitlePos(sectionTitles, headingLevel) {
		var closestToZeroElement = null;
		var minimum = 1;
		for (var i = 0; i < sectionTitles.length; i++) {
			var sectionTitle = sectionTitles.item(i);
			if (sectionTitle.tagName === headingLevel) {
				var rect = sectionTitle.getBoundingClientRect();
				if (rect.top >= 1) {
					continue;
				}
				
				if (minimum === 1 || rect.top > minimum) {
					closestToZeroElement = sectionTitle;
					minimum = rect.top;
				}
			}
		}
		
		return [closestToZeroElement, minimum];
	}
	
	function isParentActive(navItem) {
		return navItem.parentElement.previousElementSibling.classList.contains("active");
	}
})();

// Modal for figures

(function () {
	var els = document.querySelectorAll("figure, table");
	for (var i = 0; i < els.length; i++) {
		var expandEl = document.createElement("button");
		expandEl.setAttribute("class", "jatsParser__expand");
		expandEl.textContent = "\u2197";
		els.item(i).insertBefore(expandEl, els.item(i).firstChild);
	}
})();

(function () {
	var clicked = false;
	var figures = document.querySelectorAll("#jatsParserFullText figure, #jatsParserFullText table");
	var documentBody = document.body;
	var documentFadeClass = "jatsParser__fade";
	var pageYoffset = 0;
	for (var i = 0; i < figures.length; i++) {
		var expandEl = figures.item(i).querySelector(".jatsParser__expand");
		expandEl.addEventListener("click", function () {
			if (clicked) {
				return false;
			}
			
			clicked = true;
			pageYoffset = window.pageYOffset;
			var modalContent = null;
			var parentEl = this.parentElement;
			if (parentEl.tagName === "figure") {
				modalContent = parentEl.cloneNode(true);
				modalContent.setAttribute("id", "modal-" + modalContent.getAttribute("id"));
			} else {
				modalContent = document.createElement("div");
				var clonedContent = parentEl.cloneNode(true);
				modalContent.appendChild(clonedContent);
				modalContent.setAttribute("id", "modal-" + clonedContent.getAttribute("id"));
			}
			
			modalContent.classList.add("jatsParser__modal");
			documentBody.classList.add("jatsParser__fade");
			documentBody.insertBefore(modalContent, documentBody.firstChild);
			var elToRemove = modalContent.querySelector(".jatsParser__expand");
			elToRemove.parentElement.removeChild(elToRemove);
      window.scrollTo(0, 0);
			
			var closeEl = document.createElement("button");
			closeEl.setAttribute("id", "jatsParser__close");
			closeEl.setAttribute("aria-label", "close");
			closeEl.textContent = "\u2199";
			modalContent.insertBefore(closeEl, modalContent.firstChild);
			
			closeEl.addEventListener("click", function () {
				documentBody.removeChild(modalContent);
				documentBody.classList.remove(documentFadeClass);
				window.scrollTo(0, pageYoffset);
				clicked = false;
			});
		});
	}
})();

After some tests, it appears that our customization was not the problem and that there is a conflict between the Citation Style Language plugin and the JATSParser 3.5 port plugin.

While inspecting the page, the div for the How to Cite block does not even appear hidden in the HTML code. It looks just like the hook for the block is not in the template, which it is.

Does anyone have any idea what the conflict between the two plugins could be?

(I also just realized that the link for the example in our 3.5 test environment only works internally; sorry about that.)

Going through the logs to see if there was any error, we identified the following error that could be linked to the How to Cite block not displaying:

[Fri Aug 28 13:57:07.740634 2026] [php:notice] [pid 1579743:tid 1579743] [client 2001:620:600:5189:3::18:51038] Plugin generic/jatsParser failed to handle the hook ArticleHandler::view\nError: Call to undefined method Seboettg\\CiteProc\\Style\\Macro::getChildsAffixesAndDelimiter() in /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Style/Macro.php:87\nStack trace:\n#0 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Text.php(282): Seboettg\\CiteProc\\Style\\Macro->render()\n#1 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Text.php(118): Seboettg\\CiteProc\\Rendering\\Text->renderMacro()\n#2 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Group.php(113): Seboettg\\CiteProc\\Rendering\\Text->render()\n#3 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Choose/ChooseIf.php(84): Seboettg\\CiteProc\\Rendering\\Group->render()\n#4 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Choose/Choose.php(79): Seboettg\\CiteProc\\Rendering\\Choose\\ChooseIf->render()\n#5 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Name/Substitute.php(122): Seboettg\\CiteProc\\Rendering\\Choose\\Choose->render()\n#6 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Name/Names.php(233): Seboettg\\CiteProc\\Rendering\\Name\\Substitute->render()\n#7 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Style/Macro.php(86): Seboettg\\CiteProc\\Rendering\\Name\\Names->render()\n#8 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Text.php(282): Seboettg\\CiteProc\\Style\\Macro->render()\n#9 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Text.php(118): Seboettg\\CiteProc\\Rendering\\Text->renderMacro()\n#10 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Group.php(113): Seboettg\\CiteProc\\Rendering\\Text->render()\n#11 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Group.php(113): Seboettg\\CiteProc\\Rendering\\Group->render()\n#12 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Choose/ChooseIf.php(84): Seboettg\\CiteProc\\Rendering\\Group->render()\n#13 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Choose/Choose.php(97): Seboettg\\CiteProc\\Rendering\\Choose\\ChooseIf->render()\n#14 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Layout.php(130): Seboettg\\CiteProc\\Rendering\\Choose\\Choose->render()\n#15 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Rendering/Layout.php(97): Seboettg\\CiteProc\\Rendering\\Layout->renderSingle()\n#16 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/Style/Bibliography.php(76): Seboettg\\CiteProc\\Rendering\\Layout->render()\n#17 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/CiteProc.php(137): Seboettg\\CiteProc\\Style\\Bibliography->render()\n#18 /home/www/journals/plugins/generic/jatsParser/JATSParser/vendor/seboettg/citeproc-php/src/CiteProc.php(183): Seboettg\\CiteProc\\CiteProc->bibliography()\n#19 /home/www/journals/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.php(604): Seboettg\\CiteProc\\CiteProc->render()\n#20 /home/www/journals/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.php(335): APP\\plugins\\generic\\citationStyleLanguage\\CitationStyleLanguagePlugin->getCitation()\n#21 [internal function]: APP\\plugins\\generic\\citationStyleLanguage\\CitationStyleLanguagePlugin->getTemplateData()\n#22 /home/www/journals/lib/pkp/classes/plugins/Hook.php(164): call_user_func_array()\n#23 /home/www/journals/lib/pkp/classes/plugins/Hook.php(132): PKP\\plugins\\Hook::run()\n#24 /home/www/journals/pages/article/ArticleHandler.php(364): PKP\\plugins\\Hook::call()\n#25 [internal function]: APP\\pages\\article\\ArticleHandler->view()\n#26 /home/www/journals/lib/pkp/classes/core/PKPRouter.php(327): call_user_func()\n#27 /home/www/journals/lib/pkp/classes/core/PKPPageRouter.php(249): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#28 /home/www/journals/lib/pkp/classes/core/Dispatcher.php(157): PKP\\core\\PKPPageRouter->route()\n#29 /home/www/journals/lib/pkp/classes/core/PKPApplication.php(429): PKP\\core\\Dispatcher->dispatch()\n#30 /home/www/journals/index.php(21): PKP\\core\\PKPApplication->execute()\n#31 {main}, referer: https://oap.unige.ch/journals/sdk/index

Does anyone have any idea where the issue could be?
Here is an example with an article where the How to cite block does not show.

Thank you for your help in advance.