Installation failure

We are unable to install OJS 3.5 on Cpanel either from Softaculous or from .tar.gz archive.

Error 500 after installation, with this message:

[26-Mar-2026 07:52:31 Europe/Bucharest] PHP Fatal error: Uncaught TypeError: PKP\userGroup\Repository::forgetEditorialCache(): Argument #1 ($contextId) must be of type int, null given, called in /home/rrmlro/public_html/ojswork/lib/pkp/classes/userGroup/UserGroup.php on line 348 and defined in /home/rrmlro/public_html/ojswork/lib/pkp/classes/userGroup/Repository.php:604
Stack trace:
#0 /home/rrmlro/public_html/ojswork/lib/pkp/classes/userGroup/UserGroup.php(348): PKP\userGroup\Repository::forgetEditorialCache()
#1 /home/rrmlro/public_html/ojswork/lib/pkp/classes/install/PKPInstall.php(265): PKP\userGroup\UserGroup->save()
#2 [internal function]: PKP\install\PKPInstall->createData()
#3 /home/rrmlro/public_html/ojswork/lib/pkp/classes/install/Installer.php(491): call_user_func()
#4 /home/rrmlro/public_html/ojswork/lib/pkp/classes/install/Installer.php(298): PKP\install\Installer->executeAction()
#5 /home/rrmlro/public_html/ojswork/lib/pkp/classes/install/Installer.php(207): PKP\install\Installer->executeInstaller()
#6 /home/rrmlro/public_html/ojswork/lib/pkp/classes/install/form/InstallForm.php(198): PKP\install\Installer->execute()
#7 /home/rrmlro/public_html/ojswork/lib/pkp/pages/install/InstallHandler.php(93): PKP\install\form\InstallForm->execute()
#8 [internal function]: PKP\pages\install\InstallHandler->install()
#9 /home/rrmlro/public_html/ojswork/lib/pkp/classes/core/PKPRouter.php(327): call_user_func()
#10 /home/rrmlro/public_html/ojswork/lib/pkp/classes/core/PKPPageRouter.php(249): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#11 /home/rrmlro/public_html/ojswork/lib/pkp/classes/core/Dispatcher.php(157): PKP\core\PKPPageRouter->route()
#12 /home/rrmlro/public_html/ojswork/lib/pkp/classes/core/PKPApplication.php(429): PKP\core\Dispatcher->dispatch()
#13 /home/rrmlro/public_html/ojswork/index.php(21): PKP\core\PKPApplication->execute()
#14 {main}
thrown in /home/rrmlro/public_html/ojswork/lib/pkp/classes/userGroup/Repository.php on line 604

Did anyone have the same issue?

Hi @sioana2002

Hmmm… I cannot reproduce it locally.
According to your error log, it seems that the admin user group that is created in PKPInstall.php has masthead != 0, instead of no mashtead i.e. masthead = 0, which I do not understand how.

Would it maybe be possible for you to apply this change in the PKPInstall.php explicetly say that admin user group masthead is 0 · bozana/pkp-lib@67d5987 · GitHub and test the installation again?

What PHP version do you have?

Best,
Bozana

PHP version is 8.2 and after a new install from softaculous on cpanel I get

[01-Apr-2026 18:39:01 Europe/Bucharest] PHP Fatal error:  Uncaught TypeError: PKP\site\Version::setMajor(): Argument #1 ($major) must be of type int, string given, called in /home/rrmlro/public_html/ojs/lib/pkp/classes/site/Version.php on line 46 and defined in /home/rrmlro/public_html/ojs/lib/pkp/classes/site/Version.php:121
Stack trace:
#0 /home/rrmlro/public_html/ojs/lib/pkp/classes/site/Version.php(46): PKP\site\Version->setMajor()
#1 /home/rrmlro/public_html/ojs/lib/pkp/classes/site/VersionDAO.php(80): PKP\site\Version->__construct()
#2 /home/rrmlro/public_html/ojs/lib/pkp/classes/site/VersionDAO.php(44): PKP\site\VersionDAO->_returnVersionFromRow()
#3 /home/rrmlro/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(248): PKP\site\VersionDAO->getCurrentVersion()
#4 /home/rrmlro/public_html/ojs/classes/core/Application.php(47): PKP\core\PKPApplication->__construct()
#5 /home/rrmlro/public_html/ojs/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#6 /home/rrmlro/public_html/ojs/lib/pkp/classes/cliTool/CommandLineTool.php(43): require_once('/home/rrmlro/pu...')
#7 /home/rrmlro/public_html/ojs/tools/bootstrap.php(17): require('/home/rrmlro/pu...')
#8 /home/rrmlro/public_html/ojs/lib/pkp/tools/scheduler.php(41): require_once('/home/rrmlro/pu...')
#9 {main}
  thrown in /home/rrmlro/public_html/ojs/lib/pkp/classes/site/Version.php on line 121

Hi @sioana2002

Could you apply these changes, and try to install again: pkp/pkp-lib#12523 cast version fields to int when reading from DB to … · bozana/pkp-lib@7e94e0d · GitHub ?

Thanks!
Bozana