Environment:
-
OJS Version: 3.4.0.10
-
PHP Version: 8.1+
-
Upgrade Path: OJS 3.3.0.13 → 3.4.0.10
Issue Summary:
The WebFeed Plugin included with OJS 3.4.0.10 has two critical compatibility issues that cause fatal errors when RSS/Atom feeds are accessed. Both issues are related to deprecated methods that were changed in the OJS 3.4 architecture.
Error #1: UserGroup Method Not Found
Error Message:
Fatal error: Uncaught Error: Call to undefined method PKP\userGroup\UserGroup::withContextIds()
in /journal/plugins/generic/webFeed/WebFeedGatewayPlugin.php:99
Cause:
The UserGroup::withContextIds() static method was removed in OJS 3.4 in favor of the Repository pattern.
Location:
File: plugins/generic/webFeed/WebFeedGatewayPlugin.php
Line: 99
Current Code (BROKEN):
php
$userGroups = UserGroup::withContextIds([$context->getId()])->get();
Fixed Code:
php
$userGroups = Repo::userGroup()->getCollector()
->filterByContextIds([$context->getId()])
->getMany();
```
---
### **Error #2: LocaleConversion Method Not Found**
**Error Message:**
```
Fatal error: Uncaught Error: Call to undefined method PKP\i18n\LocaleConversion::toBcp47()
in /journal/plugins/generic/webFeed/WebFeedGatewayPlugin.php:140
Cause:
The LocaleConversion::toBcp47() method doesn’t exist in OJS 3.4.0.10.
Location:
File: plugins/generic/webFeed/WebFeedGatewayPlugin.php
Line: 140
Current Code (BROKEN):
php
'language' => LocaleConversion::toBcp47(Locale::getLocale()),
Fixed Code:
php
'language' => str_replace('_', '-', Locale::getLocale()),