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

Fatal error when accessing site settings #10934

Open
jonasraoni opened this issue Feb 14, 2025 · 0 comments · May be fixed by #10940
Open

Fatal error when accessing site settings #10934

jonasraoni opened this issue Feb 14, 2025 · 0 comments · May be fixed by #10940
Assignees
Labels
Bug:2:Major A bug found in common paths that reduces functionality for a large number of users
Milestone

Comments

@jonasraoni
Copy link
Contributor

jonasraoni commented Feb 14, 2025

Describe the bug
When accessing the site settings, an exception is raised. The regression was created at #10837

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function PKP\components\forms\announcement\PKPAnnouncementForm::__construct(), 4 passed in C:\work\pkp\3.4\ojs\lib\pkp\pages\admin\AdminHandler.php on line 209 and exactly 6 expected in C:\work\pkp\3.4\ojs\lib\pkp\classes\components\forms\announcement\PKPAnnouncementForm.php:49
Stack trace:
#0 C:\work\pkp\3.4\ojs\lib\pkp\pages\admin\AdminHandler.php(209): PKP\components\forms\announcement\PKPAnnouncementForm->__construct('http://localhos...', Array, 'http://localhos...', 'http://localhos...')
#1 [internal function]: PKP\pages\admin\AdminHandler->settings(Array, Object(APP\core\Request))
#2 C:\work\pkp\3.4\ojs\lib\pkp\classes\core\PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#3 C:\work\pkp\3.4\ojs\lib\pkp\classes\core\PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#4 C:\work\pkp\3.4\ojs\lib\pkp\classes\core\Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#5 C:\work\pkp\3.4\ojs\lib\pkp\classes\core\PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#6 C:\work\pkp\3.4\ojs\index.php(22): PKP\core\PKPApplication->execute()
#7 {main}
  thrown in C:\work\pkp\3.4\ojs\lib\pkp\classes\components\forms\announcement\PKPAnnouncementForm.php on line 49

Besides the exception, the argument position should also be fixed (required arguments shouldn't appear after optional ones).

In order to simulate it in OJS 3.4, it's needed to add a feature flag on the config.inc.php and also run a migration.

To Reproduce

  1. Access the Administration > Site Settings
  2. See error

What application are you using?
OJS 3.4

@jonasraoni jonasraoni added the Bug:2:Major A bug found in common paths that reduces functionality for a large number of users label Feb 14, 2025
@jonasraoni jonasraoni added this to the 3.4.0-9 milestone Feb 14, 2025
@jonasraoni jonasraoni self-assigned this Feb 14, 2025
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Feb 14, 2025
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Feb 14, 2025
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Feb 14, 2025
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Feb 14, 2025
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Feb 14, 2025
@jonasraoni jonasraoni linked a pull request Feb 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:2:Major A bug found in common paths that reduces functionality for a large number of users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant