Application: OJS 3.5.0-0 (also confirmed in 3.5.0-1)
Plugin: OpenID
Environment: PHP 8.1 / MySQL 8 / Apache (cPanel)
Context: Registration via ORCID (OpenID provider)
Summary
When a new user registers using ORCID (through the OpenID plugin), the process stops after submitting the second registration step.
The browser displays a blank page, and the PHP error log shows a fatal error:
PHP Fatal error: Uncaught BadMethodCallException:
Call to undefined method PKP\userGroup\UserGroup::getId()
Steps to Reproduce
-
Enable and configure the OpenID plugin with ORCID provider.
-
Click “Register with ORCID” on the registration page.
-
Authenticate successfully on ORCID.
-
Choose “I am a new user” and fill in the form.
-
Click Continue —> results in a blank page.
Actual Behavior
-
The registration process crashes.
-
The system logs a fatal error, and the page turns blank.
Error Trace
PHP Fatal error: Uncaught BadMethodCallException:
Call to undefined method PKP\userGroup\UserGroup::getId()
in /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:67
Stack trace:
#0 …/plugins/generic/openid/forms/OpenIDStep2Form.php(369):
Illuminate\Database\Eloquent\Model::__call(‘getId’, Array)
…
Root Cause
In OJS 3.5, the UserGroup model was migrated to Eloquent and no longer provides a getId() method. Its primary key is now accessible via the Eloquent property $userGroup->id. However, the OpenID plugin (bundled version) still uses $defaultReaderGroup->getId(); inside OpenIDStep2Form::_registerUser() (around line 369).