pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
306 stars 445 forks source link

PHP fatal error in OPS APP\observers\events\Usage #8125

Closed asmecher closed 2 years ago

asmecher commented 2 years ago

Describe the bug When building the test dataset with OPS main, I see the following error:

PHP Fatal error:  Uncaught Error: Call to undefined method APP\observers\events\Usage::getCanonicalUrl() in /home/asmecher/git/ops-main/lib/pkp/classes/observers/traits/UsageEvent.php:70
Stack trace:
#0 /home/asmecher/git/ops-main/classes/observers/events/Usage.php(31): APP\observers\events\Usage->traitConstruct()
#1 /home/asmecher/git/ops-main/pages/index/IndexHandler.php(99): APP\observers\events\Usage->__construct()
#2 [internal function]: APP\pages\index\IndexHandler->index()
#3 /home/asmecher/git/ops-main/lib/pkp/classes/core/PKPRouter.php(465): call_user_func()
#4 /home/asmecher/git/ops-main/lib/pkp/classes/core/PKPPageRouter.php(307): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#5 /home/asmecher/git/ops-main/lib/pkp/classes/core/Dispatcher.php(163): PKP\core\PKPPageRouter->route()
#6 /home/asmecher/git/ops-main/lib/pkp/classes/core/PKPApplication.php(379): PKP\core\Dispatcher->dispatch()
#7 /home/asmecher/git/ops-main/index.php(70): PKP\core\PKPApplication->execute()
#8 {main}
  thrown in /home/asmecher/git/ops-main/lib/pkp/classes/observers/traits/UsageEvent.php on line 70

This doesn't appear to break the test builds, but does suggest that events are not getting recorded.

To Reproduce Build the test dataset on OMP main.

Vitaliy-1 commented 2 years ago

I see the same error in OJS too

bozana commented 2 years ago

PR: https://github.com/pkp/ops/pull/324