- last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago Patch Failed to Apply - 🇧🇪Belgium aimevp Belgium
I get that the patch was not the correct way to fix the issue but nevertheless there's still an issue in Ctools when using this feature on D10 because D10 no longer has the class "Drupal\Node\\Plugin\\Condition\NodeType". It was removed as stated in the deprecation message. Imho Ctools is not D10 compatible as it generates errors trying to read this deprecated condition plugin. We need a patch that removes this plugin instead of renaming use statements etc...
This is the error I get when I try to create a new "entity_view (Content) block:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /admin/structure/block/add/entity_view StatusText: 500 Service unavailable (with message) ResponseText: The website encountered an unexpected error. Please try again later. Error: Class "Drupal\Node\\Plugin\\Condition\NodeType" not found in include() (line 19 of modules/contrib/ctools/src/Plugin/Condition/NodeType.php). Composer\\Autoload\\{closure}() (Line: 427) Composer\\Autoload\\ClassLoader->loadClass() ReflectionClass->;__construct() (Line: 94) Drupal\\Component\\Plugin\\Discovery\\AttributeClassDiscovery->getDefinitions() (Line: 55) Drupal\\Core\\Plugin\\Discovery\\AttributeDiscoveryWithAnnotations->getDefinitions() (Line: 86) Drupal\\Component\\Plugin\\Discovery\\DerivativeDiscoveryDecorator->getDefinitions() (Line: 309) Drupal\\Core\\Plugin\\DefaultPluginManager->findDefinitions() (Line: 194) Drupal\\Core\\Plugin\\DefaultPluginManager->getDefinitions() (Line: 23) Drupal\\Core\\Condition\\ConditionManager->getDefinitionsForContexts() (Line: 21) Drupal\\Core\\Condition\\ConditionManager->getFilteredDefinitions() (Line: 229) Drupal\\block\\BlockForm->buildVisibilityInterface() (Line: 129) Drupal\\block\\BlockForm->form() (Line: 106) Drupal\\Core\\Entity\\EntityForm->buildForm() call_user_func_array() (Line: 536) Drupal\\Core\\Form\\FormBuilder->retrieveForm() (Line: 283) Drupal\\Core\\Form\\FormBuilder->buildForm() (Line: 48) Drupal\\Core\\Entity\\EntityFormBuilder->getForm() (Line: 27) Drupal\\block\\Controller\\BlockAddController->blockAddConfigureForm() call_user_func_array() (Line: 123) Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 583) Drupal\\Core\\Render\\Renderer->executeInRenderContext() (Line: 121) Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 166) Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() (Line: 74) Symfony\\Component\\HttpKernel\\HttpKernel->handle() (Line: 58) Drupal\\Core\\StackMiddleware\\Session->handle() (Line: 48) Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle() (Line: 61) Drupal\\tkp_forgerock\\StackMiddleware\\ForgerockHeaders->handle() (Line: 48) Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle() (Line: 51) Drupal\\Core\\StackMiddleware\NegotiationMiddleware->handle() (Line: 51) Drupal\\Core\\StackMiddleware\\StackedHttpKernel->handle() (Line: 704) Drupal\\Core\\DrupalKernel->handle() (Line: 21)
I've also changed this to major because I'm guessing this is breaking for sites that use this and upgrade from D9 to D10.
Included is a patch (compatible for v4) which removes the plugin.Maybe what we really need asap is a dev version of 4.1.x or 5.x (only D10+ compatible) where this plugin has been removed.
- 🇺🇸United States yesct
Can this issue be closed? https://www.drupal.org/project/ctools → already says the current version (4.0.4) is D10 compatible.
- last update
7 months ago 63 pass - last update
7 months ago 63 pass - 🇺🇸United States japerry KVUO
The only way comment #6 could be reached is with an existing block using the node_type condition plugin. Additionally, something would need to define the plugin condition in Drupal 10+.
The MR removes node type from Drupal 10, and transforms it to use EntityBundle in D9. If you wish to use node_type in D10, you would need to implement the node_type definition within hook_condition_info_alter
- Status changed to Fixed
6 months ago 10:34pm 28 May 2024 - 🇺🇸United States japerry KVUO
Reviewed with eclipsegc, and the MR should fix this issue. There might be random issues for sites upgrading, for those cases please open a new issue
Automatically closed - issue fixed for 2 weeks with no activity.