pkp / immersion

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

OJS 3.4 upgrade returns error: Unrecognized DAO SectionDAO #85

Closed israelcefrin closed 1 year ago

israelcefrin commented 1 year ago

Describe the bug After upgrading an installation from OJS 3.3 to OJS 3.4 the journal stops to work on the frontend when Immersion Theme is enabled. It returns an error code 500

To Reproduce Steps to reproduce the behavior:

  1. Upgrade OJS 3.3 to 3.4
  2. Go to dashboard
  3. Enable and select Immersion theme (using tag 1.1.2)
  4. Check the home page
  5. See the error

Expected behavior Loading the public interface.

Desktop (please complete the following information):

Additional context Apache log error message:

Fatal error: Uncaught Exception: Unrecognized DAO SectionDAO! in /var/www/html/lib/pkp/classes/db/DAORegistry.php:77 
Stack trace: 
#0 /var/www/html/plugins/themes/immersion/z(186): PKP\db\DAORegistry::getDAO('SectionDAO') 
#1 [internal function]: ImmersionThemePlugin->addIssueTemplateData('TemplateManager...', Array) 
#2 /var/www/html/lib/pkp/classes/plugins/Hook.php(140): call_user_func_array(Array, Array) 
#3 /var/www/html/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('TemplateManager...', Array) 
#4 /var/www/html/lib/pkp/classes/template/PKPTemplateManager.php(1300): PKP\plugins\Hook::call('TemplateManager...', Array) 
#5 /var/www/html/pages/index/IndexHandler.php(80): PKP\template\PKPTemplateManager->display('frontend/pages/...') 
#6 [internal function]: APP\pages\index\IndexHandler->index(Array, Object(APP\core\Request)) 
#7 /var/www/html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request)) 
#8 /var/www/html/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false) 
#9 /var/www/html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request)) 
#10 /var/www/html/lib/pkp/classes/core/PKPApplication.php(373): PKP\core\Dispatcher->dispatch(Object(APP\core\Request)) 
#11 /var/www/html/index.php(21): PKP\core\PKPApplication->execute() 
#12 {main} thrown in /var/www/html/lib/pkp/classes/db/DAORegistry.php on line 77
touhidurabir commented 1 year ago

In 3.4.0, the SectionDAO has been removed and it has moved to the new Repository/DAO/Map pattern , check https://github.com/pkp/pkp-lib/issues/7128 .

The core plugin file ImmersionThemePlugin.inc.php need some update regarding of replacing the old SectionDAO calls to new repository pattern implementation .

touhidurabir commented 1 year ago

@Vitaliy-1 PR to review immersion --> https://github.com/pkp/immersion/pull/86

Vitaliy-1 commented 1 year ago

Thanks, @touhidurabir! I'm wondering, how did tests miss that... Was this SectionDAO refactoring merged after themes release for 3.4?

israelcefrin commented 1 year ago

Thanks @touhidurabir ! I've patched my installation with the PR and now it is working perfectly.

Vitaliy-1 commented 1 year ago

Merged!