- 🇺🇸United States Harish.04
Hi All,
In our case it was the Advanced Ban module which was throwing errors while Uninstalling modules. On disabling advban module the error is gone. Hope it helps someone.
Thanks,
Harish M. - 🇸🇮Slovenia joco_sp
As multiple people reported above, this seams like a core issue. Applying the patch from https://www.drupal.org/project/drupal/issues/3207813 🐛 ModuleHandler skips all hook implementations when invoked before the module files have been loaded Needs work worked for me.
At first I thought that the error was related to paragraphs, later to Shield module, but nothing worked until I applied the patch #27 from that issue 🐛 ModuleHandler skips all hook implementations when invoked before the module files have been loaded Needs work .
- 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin
#63 thx for comig back on this to let know and to confirm our assumptions starting from #50 and below. Would be great to get more confirmation on this so that the module maintainers can decide closing this one probably in favour of thw core issue if this gets in soon.
- 🇮🇱Israel YuvalBH
After clearing the cache the problem disapear
make sure drush is installed
I had to activate "drush cr" twice in order to clear the cache and make the page rebuild - 🇳🇱Netherlands Nicasso
By applying this patch on Drupal Core (not on the paragraphs module) (this is currently patched on Drupal core version: 9.5.10), the crash will be prevented. Or well, at least in my situation it does. Please note that this patch is more like a a bandage and its not intended as a permanent fix whatsoever. But I guess its better than a website that occasionally crashes...
- 🇮🇳India nitesh624 Ranchi, India
I might be wrong but when I saw https://git.drupalcode.org/project/paragraphs/-/blob/8.x-1.x/src/Entity/... file I could not see translation class definition under handlers section
* handlers = { * "view_builder" = "Drupal\paragraphs\ParagraphViewBuilder", * "access" = "Drupal\paragraphs\ParagraphAccessControlHandler", * "storage_schema" = "Drupal\paragraphs\ParagraphStorageSchema", * "form" = { * "default" = "Drupal\Core\Entity\ContentEntityForm", * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm", * "edit" = "Drupal\Core\Entity\ContentEntityForm" * }, * "views_data" = "Drupal\views\EntityViewsData", * },
But when I went to core's node module src/Entity/Node.php I can see translation key see below snippet
handlers = { * "storage" = "Drupal\node\NodeStorage", * "storage_schema" = "Drupal\node\NodeStorageSchema", * "view_builder" = "Drupal\node\NodeViewBuilder", * "access" = "Drupal\node\NodeAccessControlHandler", * "views_data" = "Drupal\node\NodeViewsData", * "form" = { * "default" = "Drupal\node\NodeForm", * "delete" = "Drupal\node\Form\NodeDeleteForm", * "edit" = "Drupal\node\NodeForm", * "delete-multiple-confirm" = "Drupal\node\Form\DeleteMultiple" * }, * "route_provider" = { * "html" = "Drupal\node\Entity\NodeRouteProvider", * }, * "list_builder" = "Drupal\node\NodeListBuilder", * "translation" = "Drupal\node\NodeTranslationHandler" * },
I think paragraph should also have this translation handler.
- Status changed to Closed: won't fix
12 months ago 7:57am 13 December 2023 - 🇨🇭Switzerland berdir Switzerland
No, content_translation adds a default implementation. The point is that hook doesn't run, which is the fault of the core issue mentioned many times: 🐛 ModuleHandler skips all hook implementations when invoked before the module files have been loaded Needs work .
This is just one aspect of many that you'll run into with hook problems due to that core issue, it does not need a specific workaround. I've only kept this open so it's easier to find for people, but I want to make it clear that this is not a bug in this module.
- 🇻🇳Vietnam nguyenphan Hanoi, Vietnam
Sometimes, my site crashes because of the error: The "paragraph" entity type did not specify a translation handler. I applied patch #66, and it is okay now.
- 🇻🇳Vietnam nguyenphan Hanoi, Vietnam
>Sometimes, my site crashes because of the error: The "paragraph" entity type did not specify a translation handler. I applied patch #66, and it is okay now.
Basically, anywhere that doesn't use paragraphs won't have an error. If any page uses paragraphs, an error will appear. Therefore, I think it is true that this patch cannot be used yet
No doubt core is the root cause, however, the occurrence frequency of the error happened on paragraphs is an outcry for more robustness on the module itself.
If my read of core code is correct, `content_translation_language_fallback_candidates_entity_view_alter` is the core code that assigns default translation handler, so when the core issue as @casey and @Berdir pointed out happens, the default handler fails to assign to paragraphs entity definition. If that's the case, patch in #45 should be the simplest solution without tampering or waiting core to fix. However, the interesting part is comment #52 said the error went back even with the patch applied.
I'm going to verify if patch #45 works for my project. Nonetheless, it's no harm to apply it to the codebase and technically it should help on the core's hook issue at least in some cases, so I'd suggest maintainer to consider including it in the following releases.