
Problem/Motivation
We updated a project to drupal 9.2.x and simple_oauth to 5.0.5
It generated a fatal error:
NOTICE: PHP message: PHP Fatal error: Class Drupal\simple_oauth\Authentication\TokenAuthUser contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\TypedData\TranslatableInterface::setIsDefaultTranslation) in /app/web/modules/contrib/simple_oauth/src/Authentication/TokenAuthUser.php on line 18
I think we just need to add the missing method
Comment | File | Size | Author |
---|---|---|---|
#7 | simple_oauth-fix_tokenauthuser_abstract_method_error-3241249.patch | 634 bytes | wilco |
Issue fork simple_oauth-3241249
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Toggle MR activityComment #2
louis-cuny CreditAttribution: louis-cuny at Aïon Solutions commentedComment #3
louis-cuny CreditAttribution: louis-cuny at Aïon Solutions commentedComment #5
bradjones1Same general issue as #3038281: TokenAuthUser abstract methods must be declared (4 missing)
Comment #6
bradjones1I believe this was cleaned up recently; please validate on 5.2.0.
Comment #7
wilco CreditAttribution: wilco as a volunteer commentedThis fix has problems with it. The method setIsDefaultTranslation() should not cast for a boolean nor default to NULL as this is NOT the way $is_default_translation is cast. So, PHP is throwing errors.
This patch attempts to repair this issue. BTW, this is against 5.2.0 of the module.
Comment #8
bojan_dev CreditAttribution: bojan_dev at Open Social commentedThe method 'setIsDefaultTranslation' is only available with a patch from: #2810355: $entity->isDefaultTranslation() behaves incorrectly when changing default translation, causing file/image field usage to be set to zero, causing files to be deleted.
The core issue still needs work, postponing it for now.