Article preview problem (OJS

Hello to everyone who is in the know.

How to fix it?

When using the bootstrap3 theme (version in OJS (version, I encountered one strange problem:
When I try to open the article details (Article Title) through the preview via Dashboard (Issues → Future Issues → Preview→ Article Title), the browser displays a blank page (Mozilla), the browser (Google Chrome) returns HTTP ERROR 500.
At the same time, if you use the default theme, everything works fine and the browser displays the necessary detailed information of the article (abstract, etc.) through the same Dashboard path (Issues → Future Issues → Preview → Article Title).
I found the following errors in the PHP server error logs:

thrown in /home/np433659/ on line 511
#21 {main}
#20 /home/np433659/ PKP\core\PKPApplication->execute()
#19 /home/np433659/ PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#18 /home/np433659/ PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#17 /home/np433659/ PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#16 /home/np433659/ call_user_func(Array, Array, Object(APP\core\Request))
#15 [internal function]: APP\pages\issue\IssueHandler->view(Array, Object(APP\core\Request))
#14 /home/np433659/ PKP\template\PKPTemplateManager->display(‘frontend/pages/…’)
#13 /home/np433659/ Smarty_Internal_TemplateBase->display(‘frontend/pages/…’, NULL, ‘e35ba3ad88c8e24…’, NULL)
#12 /home/np433659/ Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, ‘e35ba3ad88c8e24…’, NULL, 1)
#11 /home/np433659/ Smarty_Internal_Template->render(false, 1)
#10 /home/np433659/ Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#9 /home/np433659/ Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#8 /home/np433659/ content_65ec46301fa276_56308197(Object(Smarty_Internal_Template))
#7 /home/np433659/^ Smarty_Internal_Template->_subTemplateRender(‘app:frontend/ob…’, NULL, ‘e35ba3ad88c8e24…’, 0, 3600, Array, 0, false)
#6 /home/np433659/ Smarty_Internal_Template->render()
#5 /home/np433659/ Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#4 /home/np433659/ Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#3 /home/np433659/ content_65ec4630297204_87235674(Object(Smarty_Internal_Template))
#2 /home/np433659/^ APP\plugins\PubIdPlugin->getPubId(Object(APP\issue\Issue))
#1 /home/np433659/ PKP\plugins\PKPPubIdPlugin->getContext(NULL)
#0 /home/np433659/ assert(false, ‘assert(is_numer…’)
Best regadrs, Pirate

This error is returned by the 452 thread PKPPubIdPlugin.php, namely:

public function getPubObjectType($pubObject)
$allowedTypes = $this->getPubObjectTypes();
$pubObjectType = null;
foreach ($allowedTypes as $type => $fqcn) {
if ($pubObject instanceof $fqcn) {
$pubObjectType = $type;
if (is_null($pubObjectType)) {
// This must be a dev error, so bail with an assertion.
return null;
return $pubObjectType;
It is suspected that the current Bootstrap theme has some conflict that results in a fatal error. Can anyone help?

An error occurred when calling the getPubObjectType() method in the PKPPubIdPlugin.php file. Probably the problem is related to incorrect arguments passed to this method.

Any ideas how to fix?

It is already clear that this is a problem with the bootstrap3 theme. Unfortunately, I haven’t found a solution yet, but it seems that the error is caused by incorrect styles.
I’ve attached screenshots of when the error occurs.

Maybe this will help those who will face the same error. I have fully analyzed the code of the bootstrap3 theme and the PKPPubIdPlugin.php plugin - the error is not related to the bootstrap3 theme, as I thought in previous posts, but to another plugin -
URN. It is active by default in the OJS system. When generating a preview of an article or issue, an error occurs that indicates that the code expects a boolean value of true (there is an error in the URN plugin code), but actually gets false, which leads to a failure with the assert(false) statement on line 452 in the PKPPubIdPlugin.php file.
As a temporary solution, disable the URN plugin and PKPPubIdPlugin.php will work properly with the bootstrap3 theme.
I am still analyzing the URN plugin code. Perhaps the developers will fix this bug if they pay attention to my post. Thanks to everyone who read my post.

1 Like

Hi @Pirate

Hmmm… I unfortunately cannot reproduce the error – if I enable the URN plugin and use the bootstrap3 theme, I see everything correctly… :thinking:

The URN plugin is not enabled per default.

However, glad you find the solution for you!


Same peoblem with mine. And srill couldn find the solution.