Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PHP Fatal error: Declaration of Drupal\\workbench_moderation\\Plugin\\Menu\\EditTab::getTitle() must be compatible with Drupal\\Core\\Menu\\LocalTaskDefault::getTitle(?Symfony\\Component\\HttpFoundation\\Request $request = NULL) in /code/web/modules/contrib/workbench_moderation/src/Plugin/Menu/EditTab.php on line 16, referer: http://localhost/admin/content
Using PHP 7.2 & Drupal core 8.5.0.
Comment | File | Size | Author |
---|---|---|---|
#24 | incompatible-gettitle-2952717-24.patch | 77.97 KB | sam-elayyoub |
#5 | workbench_moderation_incompatible-declaration_2952717_4.patch | 1.14 KB | syammohanmp |
#2 | workbench_moderation_incompatible-declaration_2952717_2.patch | 1000 bytes | pingers |
Comments
Comment #2
pingers CreditAttribution: pingers as a volunteer and at University of Adelaide commentedHere's a patch.
Comment #3
syammohanmp CreditAttribution: syammohanmp at Zyxware Technologies commentedIt's working fine.
Comment #5
syammohanmp CreditAttribution: syammohanmp at Zyxware Technologies commentedHere's the updated patch.
Comment #6
darvanenCommits will have to wait until #2942578: Content Moderation module marked as stable produces failures in Workbench Moderation assets loading is cleared and then #2954109: Make WorkbenchModerationTestTrait PSR4 compliant as they're blocking tests.
Comment #7
NickDickinsonWildeAs soon as those two land, this is functional and will resolve some issues.
Comment #8
Peter MajmeskuPlease add this patch to a stable release.
Comment #9
darvanenSubmitted for re-testing.
Comment #10
Peter MajmeskuJust as a hint: I was seeing this error on my entire Drupal site, when I was switching from PHP 7.1 to PHP 7.2. After switching back to PHP 7.1, the error was gone.
Comment #11
darvanenIt might be difficult to get maintainer support for this until the tests are passing and that's a whole 'nother problem right now with this module.
Comment #12
armyguyinfl CreditAttribution: armyguyinfl as a volunteer and commentedI also confirm this bug on PHP 7.2 with 8.5.3. PHP 7.1 works as a temporary solution until this is merged into core.
Comment #13
Lanoxx CreditAttribution: Lanoxx as a volunteer commentedI also had to change `core/lib/Drupal/Core/Menu/LocalTaskInterface.php` and add the Request parameter there.
Comment #14
hassebasse CreditAttribution: hassebasse commentedWhen upgrading to PHP7.2 I had this problem. As I can't downgrade to 7.1 I tried the patch workbench_moderation_incompatible-declaration_2952717_4.patch on Drupal 8.6.3 and installed it with Composer. It seem to work perfectly well.
Comment #15
darvanenLooks like module tests are passing again, re-queueing for testing.
Comment #16
mcdeltat CreditAttribution: mcdeltat commentedCan confirm that the patch in #5 helped fixed this issue on a PHP7.2 Drupal 8.6.3 Workbench 1.4 installation. Thanks to #14 for also pointing out that you can do that directly in composer with the cweagans/composer-patches plugin. That is a much nicer way of deploying.
Comment #17
darvanenLooks like I was wrong, branch is still failing.
BTW - if you haven't tried content moderation in core as an alternative to workbench, now is a good time, it's looking nice :)
Comment #18
vinlaurens CreditAttribution: vinlaurens at Ordina Digital Services for Ordina Digital Services commentedCan confirm the method above works for my Drupal 8.6.3 installation with workbench_moderation 1.4.
Comment #19
pritam.tiwari CreditAttribution: pritam.tiwari as a volunteer commentedPatch #5 working for me with PHP 7.2 and Drupal 8.6.7
Comment #20
chandu7929 CreditAttribution: chandu7929 commentedPatch #5 working fine with Drupal (8.6.7) and workbench_moderation (1.4.0) on PHP7.2
Comment #22
larowlanFixed, thanks
Comment #24
sam-elayyoub CreditAttribution: sam-elayyoub as a volunteer commentedHere's patch to fix all bugs included this bug, with drupal code standards
Comment #25
larowlanComment #26
larowlanComment #27
larowlanComment #28
larowlanComment #29
larowlanComment #30
larowlanComment #31
larowlan