pkp / immersion

An official theme for OJS 3.1.1+
GNU General Public License v2.0
10 stars 24 forks source link

New Install: Uncaught Exception: Unrecognized DAO SectionDAO! #87

Closed Orsova closed 1 year ago

Orsova commented 1 year ago

Hi all,

I’m running a new installation of OJS 3.04-1 on Ubuntu 22.04 with PHP 8.1 and Apache2.

I have a strange problem with the Immersion theme. Everything seems to work, except for the ‘Issue Data’ tab, where Immersion injects its custom section colour options.

When I access that tab, I see nothing - just an empty tab.

There are two error events in the Apache log that are of note.

The first occurs when the website is first loaded. This seems to be an Apache2 error rather than a problem with OJS, per se. It might be completely unrelated.

[Sun Jul 30 08:36:39.686889 2023] [php:notice] [pid 1305] [client ] Server host “209.250.229.15” not allowed!

[Sun Jul 30 08:36:39.686935 2023] [php:notice] [pid 1305] [client 184.105.139.67:19246] ojs2: 400 Bad Request

[Sun Jul 30 08:41:56.935671 2023] [php:notice] [pid 982] [client 143.110.222.166:43370] Server host “209.250.229.15” not allowed!

[Sun Jul 30 08:41:56.935736 2023] [php:notice] [pid 982] [client 143.110.222.166:43370] ojs2: 400 Bad Request

And the second occurs when the ‘Issue Data’ tab is accessed.

[Sun Jul 30 08:58:45.433240 2023] [php:error] [pid 2326] [client ] PHP Fatal error: Uncaught Exception: Unrecognized DAO SectionDAO! in /var/www/html/ojs/lib/pkp/classes/db/DAORegistry.php:77\nStack trace:\n#0 /var/www/html/ojs/plugins/themes/immersion/ImmersionThemePlugin.inc.php(442): PKP\db\DAORegistry::getDAO()\n#1 [internal function]: ImmersionThemePlugin->addToIssueForm()\n#2 /var/www/html/ojs/lib/pkp/classes/plugins/Hook.php(140): call_user_func_array()\n#3 /var/www/html/ojs/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run()\n#4 /var/www/html/ojs/lib/pkp/classes/form/Form.php(182): PKP\plugins\Hook::call()\n#5 /var/www/html/ojs/controllers/grid/issues/form/IssueForm.php(112): PKP\form\Form->fetch()\n#6 /var/www/html/ojs/classes/controllers/grid/issues/IssueGridHandler.php(211): APP\controllers\grid\issues\form\IssueForm->fetch()\n#7 [internal function]: APP\controllers\grid\issues\IssueGridHandler->editIssueData()\n#8 /var/www/html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#9 /var/www/html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()\n#10 /var/www/html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route()\n#11 /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.php(373): PKP\core\Dispatcher->dispatch()\n#12 /var/www/html/ojs/index.php(21): PKP\core\PKPApplication->execute()\n#13 {main}\n thrown in /var/www/html/ojs/lib/pkp/classes/db/DAORegistry.php on line 77, referer: https:///index.php/testjournal/manageIssues

I note that a similar issue was raised here:

https://github.com/pkp/immersion/issues/85

However, I cannot get the proposed solution, here:

https://github.com/pkp/immersion/pull/86/files/1cc70c27f159ddc9aa05338bd70f8ce6d62a4f33

to work.

If I implement the changes at 201 & 442, then access to the tab is restored, but if I try to set custom colours, the whole site breaks and returns an error 500.

If I implement the change at 186 as well, then the whole site breaks.

Perhaps implementing only the change at 201 is the answer, but I haven't tried this yet.

MacOs Catalina 10.15.7 Chrome 114.0.5735.198

Thank you for any assistance you can provide.

Orsova commented 1 year ago

With apologies, I've figured out my mistake.

I downloaded 1.1.2 dated March 2 from releases, rather than the most recent version from the 'code' option on the main page. I deleted the theme, and then reinstalled it. A good lesson.

I don't know how 'releases' are determined, but it might be worth noting that the March 2 code base is throwing errors and making the theme unusable for those who make the same mistake I did.

Orsova commented 1 year ago

@Vitaliy-1 @touhidurabir

asmecher commented 1 year ago

(Cross-posted: https://forum.pkp.sfu.ca/t/issue-with-ojs-immersion-theme-uncaught-exception-unrecognized-dao-sectiondao/80190/7)