Problem/Motivation
#3483599: Convert all procedural hook implementations to Hook classes moved the field_ui_entity_operation function to an OOP implementation, resulting in the following fatal on the group content page (e.g. /admin/group/types/manage/lorem/content) when using Drupal core 11.1.0.
Error: Call to undefined function Drupal\group\Plugin\Group\RelationHandlerDefault\field_ui_entity_operation() in Drupal\group\Plugin\Group\RelationHandlerDefault\OperationProvider->getOperations() (line 78 of modules/contrib/group/src/Plugin/Group/RelationHandlerDefault/OperationProvider.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3494447-20.patch | 3.24 KB | tormi |
| #17 | After_Patch.png | 682.68 KB | sdhruvi5142 |
| #17 | Before_Patch.png | 646.08 KB | sdhruvi5142 |
Issue fork group-3494447
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
Comment #4
kristiaanvandeneyndeAdded a MR that calls the module handler. This should make it work on both pre and post 11.1 Drupal.
Comment #5
arkener commentedThanks for your quick reaction Kristiaan! I've tested this patch on 11.1.0 and I'm now receiving an
Unsupported operand types: array + nullerror:Stacktrace:
Adding a simple fallback for no invokes
?? []onOperationProvider.php:78fixed this issue for me.Comment #6
simohell commentedI have the same behavior (array+null with the patch), so following the issue.
Comment #7
sayan_k_dutta commentedWorking on it.
Comment #8
sayan_k_dutta commentedComment #9
simohell commentedI tested the latest version of the MR with 11.0.10-dev and 11.1.1-dev and both worked.
A patched version also worked on the site where I encountered the issue in a real life situation on 11.1.0, so I would say the MR fixes the issue described in the summary.
Comment #10
arkener commentedTested the latest version of the MR on my instance of 11.1.0 and it also resolved the
Unsupported operand types: array + nullissue for me.Comment #11
jasonsafro commentedI encountered this problem with Drupal 11.1.1 and Group 3.3.3. The patch worked for me too.
Comment #12
jerrac commentedPatch worked for me on Group 3.3.4 and Drupal 11.1.3.
Comment #13
ikam commentedPatch also worked for me on Group 3.3.0 and Drupal Core 11.1.3
Comment #14
sanderwind commentedThe patch can be applied successfully, but does not fix implementing the
entity_operationhook of the Field UI module. It is calling the hook with a trailings, but that specific hook does not existI'll fix the invocation of the hook.
Comment #15
sanderwind commentedComment #16
sdhruvi5142 commentedComment #17
sdhruvi5142 commentedHi, Applied the MR!204 on Drupal 11.1.4 version and it is working as expected.
Testing Steps:
1. Installed group module
2. Go to /admin/group/types/manage/testing/content path
3. Oberve the changes there
Testing result:
Before applying patch I was able to see the error and after applying the patch the errors are removed able to see the page properly. Attaching the screenshots for reference. Moving this issue to RTBC+1
Status - PASS
Comment #18
sdhruvi5142 commentedComment #19
makbay commentedPatch works. Thanks!
Comment #20
tormiRTBC. Saving MR as a patch to use it safely in Composer. Source https://www.drupal.org/project/group/issues/3494447#comment-16041712
Comment #21
jlbellidoI do confirm that MR!204 works for me as well like a charm.
Thanks!
Comment #22
tvalimaa commentedPatch worked on /admin/group/types/manage/group/content page and also i had problems with saving a new groups which this also seems to solved. I didn't get any errors on saving a new group but those just didn't save but after this patch everything seems to work.
Comment #23
kristiaanvandeneyndeWill do final check and commit on Friday probably, maybe early next week.
Comment #24
dabbor commentedI needed to fix on Group 2.3.x so I created a port of the issue and manually applied the fix there: https://www.drupal.org/project/group/issues/3522375
Comment #25
kristiaanvandeneyndeGenerally, the approach is to commit to the target branch first and then the other active branches, in the same issue. Please don't open new issues for porting MRs as it makes my huge issue queue even larger.
Comment #27
kristiaanvandeneyndeThanks all!