Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'StageAssignmentDAO' not found #36

Closed
felipecorral opened this issue Dec 11, 2024 · 1 comment
Closed

Class 'StageAssignmentDAO' not found #36

felipecorral opened this issue Dec 11, 2024 · 1 comment

Comments

@felipecorral
Copy link

felipecorral commented Dec 11, 2024

OJS version 3.3.0.16

Plugin version:

  • installed/updated from plugin gallery -> same error
  • manual install from "stable 3.3" github version -> same error

When i try to publish a number, the page freezes and after press cancel button, only publish a part of articles

Error log:

PHP Fatal error:  Uncaught Error: Class 'StageAssignmentDAO' not found in /users/apache/myweb/ojs/plugins/generic/sword/SwordPlugin.inc.php:160
Stack trace:
#0 /users/apache/myweb/ojs/plugins/generic/sword/SwordPlugin.inc.php(84): SwordPlugin->performAutomaticDeposits(Object(Submission))
#1 /users/apache/myweb/ojs/lib/pkp/classes/plugins/HookRegistry.inc.php(107): SwordPlugin->callbackPublish('Publication::pu...', Array)
#2 /users/apache/myweb/ojs/lib/pkp/classes/services/PKPPublicationService.inc.php(605): HookRegistry::call('Publication::pu...', Array)
#3 /users/apache/myweb/ojs/classes/controllers/grid/issues/IssueGridHandler.inc.php(500): PKP\Services\PKPPublicationService->publish(Object(Publication))
#4 /users/apache/myweb/ojs/lib/pkp/classes/core/PKPRouter.inc.php(397): IssueGridHandler->publishIssue(Array, Object(Request))
#5 /users/apache/myweb/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRou in /users/apache/myweb/ojs/plugins/generic/sword/SwordPlugin.inc.php on line 160

I fixed that with this code in the inicialization of $dao variable:

$dao = new StageAssignmentDAO(); -> old code
$dao = DAORegistry::getDAO('StageAssignmentDAO'); -> fix

asmecher added a commit that referenced this issue Dec 11, 2024
asmecher added a commit that referenced this issue Dec 11, 2024
asmecher added a commit that referenced this issue Dec 11, 2024
@asmecher
Copy link
Member

@felipecorral, I can confirm that the proposed change is correct, thanks; I've committed it for the next releases. This plugin has been tested and works in most circumstances, and I'm not sure why your classloading situation is different -- possibly a different combination of plugins or order of plugin loading -- but this will resolve it for you without causing regressions for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants