Undefined function field_ui_entity_operation

Created on 17 December 2024, about 1 month ago

Problem/Motivation

📌 [ignore] Convert everything everywhere all at once Active 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). 
🐛 Bug report
Status

Active

Version

3.3

Component

Code

Created by

🇳🇱Netherlands arkener

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @arkener
  • First commit to issue fork.
  • 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

    Added a MR that calls the module handler. This should make it work on both pre and post 11.1 Drupal.

  • 🇳🇱Netherlands arkener

    Thanks for your quick reaction Kristiaan! I've tested this patch on 11.1.0 and I'm now receiving an Unsupported operand types: array + null error:

    Stacktrace:

      at /var/www/html/drupal/modules/contrib/group/src/Plugin/Group/RelationHandlerDefault/OperationProvider.php:78
      at Drupal\group\Plugin\Group\RelationHandlerDefault\OperationProvider->getOperations()
         (/var/www/html/drupal/modules/contrib/group/src/Plugin/Group/RelationHandler/OperationProviderTrait.php:62)
      at Drupal\group\Plugin\Group\RelationHandler\EmptyOperationProvider->getOperations()
         (/var/www/html/drupal/modules/contrib/group/src/Entity/Controller/GroupTypeController.php:202)
    ...
    

    Adding a simple fallback for no invokes ?? [] on OperationProvider.php:78 fixed this issue for me.

  • 🇫🇮Finland simohell

    I have the same behavior (array+null with the patch), so following the issue.

  • 🇮🇳India sayan_k_dutta

    Working on it.

  • Pipeline finished with Success
    30 days ago
    Total: 1392s
    #377099
  • 🇫🇮Finland simohell

    I 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.

  • 🇳🇱Netherlands arkener

    Tested the latest version of the MR on my instance of 11.1.0 and it also resolved the Unsupported operand types: array + null issue for me.

Production build 0.71.5 2024