Hi,
After restarting PHP Worker, my website went down. The log indicates the php error below:
Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginException: "Plugin (metatag_display_extender) instance class "Drupal\metatag_views\Plugin\views\display_extender\MetatagDisplayExtender" does not exist." at /app/mdm_stg/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php line 97
Drupal\Component\Plugin\Exception\PluginNotFoundException : The "metatag_display_extender" plugin does not exist. dans Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (ligne 52 de /app/mdm/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Drupal\Component\Plugin\Exception\PluginNotFoundException : The "metatag_defaults" entity type does not exist. dans Drupal\Core\Entity\EntityTypeManager->getDefinition() (ligne 133 de /app/mdm/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
I have to reupload and rebuild (composer.json ) to get the site Up back.
My question: is this problem is caused by the module drupal/metatag or the server itself? Any Idea?
Drupal version : 8.3.7
Web Server nginx/1.13.1
PHP Version: 7.0.20
Comment | File | Size | Author |
---|---|---|---|
#26 | metatag-n2927551-26.patch | 457 bytes | DamienMcKenna |
| |||
#33 | metatag-n2927551-33.patch | 4.25 KB | DamienMcKenna |
#40 | metatag-n2927551-40.patch | 9.43 KB | DamienMcKenna |
Comments
Comment #2
DamienMcKennaUgh, that sucks, sorry.
That display enhancer is enabled via metatag_views_install(), could see if you can maybe manually run that code?
Comment #3
MLZRSubscribe "The "metatag_display_extender" plugin does not exist. " ..
when upgrade from 1.2 to 8.x-1.3
Drupal 8.4.3
I tryed some things to get it working; clear all cache via phpmyadmin. Delete the map 'metatag' and set back the map from the latest backup (with ver 1.2) bud the error won't die.
So I think I have to set back an total backup..
Comment #4
MLZROk, I had to restore the whole drupal setup, where version 1.2 was in place. Then I delete the metatag map and copy the version metatag 8.x-1.x dev in pace. And that worked!
Comment #5
joerch CreditAttribution: joerch as a volunteer commentedSubscribe
when upgrade to 8.x-1.4:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "metatag_display_extender" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedThis seems to happen to us, but with another module. I'd love some insight on why this happens, but my current theory is:
Ours happens during our CI tests. If we try to rebuild the site cache during tests doing a lot of site searches, it happens with modules that load entities on the front end of our site. Once the error shows up, it doesn't go away on next page load. However if we clear cache again it seems to go away. At some point during the cache clear it seems requests can get through to Drupal and it causes an incomplete plugin discovery phase that ends up getting cached.
Comment #7
joerch CreditAttribution: joerch as a volunteer commentedNow i ran into the same issue again when update to 8.x-1.5:
The update via UI went wrong and i had to restore the site. Some files were missing in the metatag directory.
Afterwards i updated the module manually and all was ok.
For me it seems to be a problem with the permissions/owner of the files in the metatag directory. I couldn't find out the exact reason for the issue. Couldn't find any differences to the other modules i could update via UI. Maybe i'll find time later to figure out more.
Comment #8
jigariusMy site is perfectly healthy and the module installs correctly as well. When I configure metatags for a view and save the configuration with something as basic as a change in the meta title, I get the error:
The configuration property display.page_upcoming.display_options.display_extenders.metatag_display_extender.metatags.robots.index doesn't exist
Comment #9
denomdub CreditAttribution: denomdub commentedI am still unable to find a fix for this error. I am start updating to the latest drupal 8 version (8.5.4) and i get the AJAX 500 error (update is unable to complete) and this in the log.
Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: The "metatag_display_extender" plugin does not exist. in /Users/deniswamala/Sites/SPU/www/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php on line 52
Has anyone gotten this error like this and successfully fixed it?
Kindly Help
Denis
Comment #10
aangel CreditAttribution: aangel commentedThis was happening to me after I upgraded to 8.5.4. I ran metatag_views_install() but that wasn't the problem.
Inside AnnotatedClassDiscovery.php, this code:
was not looking for "modules/contrib/metatag/metatag_views/src/Plugin/views/display_extender," the iterator skips over it (though it did look inside the metatag module). Attempting to cheat by placing MetatagDisplayExtender.php (which contains the annotation @ViewsDisplayExtender) in metatag/src/Plugin/views/display_extender did not work.
The rootNamespacesIterator simply was not producing /metatag/metatag_views for the namespace check to occur. Checking with "drush pml" showed that metatag_views was not enabled—but I didn't turn it off.
Re-enabling the module allows Drupal to find the annotated class because it correctly scans the correct module that contains it.
I have no idea what turned off the module. I did not upgrade Metatag (current version was fine per composer). I did, however, allow Pantheon to upgrade the code to 8.5.4.
Until the mystery of The Curious Case of the Auto-Disabling Module is discovered, performing the following at least worked for me:
Comment #11
denomdub CreditAttribution: denomdub commentedThanks for the response @aangel but I am unable to find the module metatag_view
Comment #12
DamienMcKennaThat would have been a small typo, please try this:
drush en -y metatag_views
Comment #13
denomdub CreditAttribution: denomdub commentedApologies for the delayed response. I had to re-install Composer & Drush and the site (from backup)
Here's the error i get now at the terminal:
error] Configuration objects (metatag.metatag_defaults.403, metatag.metatag_defaults.404, metatag.metatag_defaults.front, metatag.metatag_defaults.global, metatag.metatag_defaults.node, metatag.metatag_defaults.taxonomy_term, metatag.metatag_defaults.user) provided by metatag already exist in active configuration
Makes sense?
I Tried removing it with composer and putting it back, enabled it with drush and still came up with the same error on the terminal.
Looking forward to any assistance,
Kind regards,
Denis
Comment #14
denomdub CreditAttribution: denomdub commentedHere's how i got it fixed!
Error was gone.
(Hope this helps someone as well). Thanks for everthing.
Comment #15
DamienMcKennaFYI I ran into this problem when restructuring the codebase of a site - the Metatag module was moved to a different directory and after I ran "drush cr all" it threw the error.
Comment #16
DamienMcKennaComment #17
Nigel CunninghamJust logging another potential cause of the above error.
I'm seeking to build a profile with a bunch of pre-enabled modules, including Views and Metatag views. The config export views.settings.yml includes
and this causes an error when trying to install the profile (it looks like metatag views is not yet enabled when a view gets restored). Seems like a bit of a circular dependency. My simple fix was to remove the above two lines from view.settings.yml, but I realise that's not a proper fix (Getting this profile install working is just one bug after another so please forgive my laziness on this count!)
Comment #18
Rob230 CreditAttribution: Rob230 as a volunteer commented#10 has solved this problem for me. I don't know how
metatag_views
disabled itself, but re-enabling it solved the exception.Comment #19
mpp CreditAttribution: mpp at District09 for District09 commentedThis error might be caused by a few things:
- a wrong namespace in the plugin
- cached plugins (run cache-clear)
See https://www.drupal.org/project/drupal/issues/1846070 for an improved error message.
Comment #20
jrearickJust running in to this when adding metatag_views to our profile. We had metatag and other metatag_* modules installed from before, no problem. To enable metatag_views on initial install we added metatag_views to our core.extension.yml and the display_extender to views.settings.yml and it works just fine.
The issue comes in when I tried writing a hook_update in the profile to enable the module:
After running this db update on an existing site with
drush updb
, it doesn't seem to be installed. I go to the DB and see that metatag_views is not in the list for core.extension.yml and views.settings.yml are not updated. I clear cachedrush cr
and the entire site blows up that it can't find the metatag_display_extender plugin.I can fix it by
drush pm-uninstall metatag_views
thendrush enable metatag_views
. But that isn't a really good way to move forward with adding a one-time step to our deployment process. I found that enabling the module any other way seems to work just fine. Here's what I tried:drush enable metatag_views
.drush php:cli
then copy/paste in\Drupal::service('module_installer')->install(['metatag_views']);
returns true and worksSo, this leads me to believe the
drush updb
process misses something. I was running Drush 9.7.1. There were no errors in any logs I could find (watchdog, php, apache), except for the resulting error about not finding the metatag_display_extender plugin.The final solution for us was to add
drupal_flush_all_caches();
in our update hook immediately after install.I hope this comment helps others with the same issue.
Comment #21
Phil Wolstenholme CreditAttribution: Phil Wolstenholme as a volunteer commentedI had this issue when trying to add
metatag_views
to an install profile too.I fixed this issue by adding a config dependency on
metatag_views
toviews.settings.yml
.It would be good if
metatag_views
could add this dependency itself, or expose the right information so Drupal Core can be aware of the dependency and include it in theviews.settings.yml
config file.Edit: https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-... seems relevant perhaps?
Comment #22
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commentedI am facing the above this issue when using blt and running a blt setup command, while blt tries to reinstall the site from scratch and importing the existing config I get the same error as below:
I tried adding the dependencies of
metatag_views
module inviews.settings.yml
file as, mentioned in #21 but it didnt resolve the issue for me.Comment #23
DamienMcKennaI think adding the dependency on the View definition that uses Metatag would be better than modifying views.settings.yml?
Comment #24
idiaz.ronceroSame as #22: I can't do a site install from config (used for automated tests,
drush si --existing-config -y
), this error makes it crash.metatag_views module is enabled on config.
Comment #25
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commented@DamienMcKenna tried adding the dependency to the view definition that uses the metatag_views but even this didnt work, secondly I obsered that it fails when
scheduler
module is getting installed, and hence little confused how and why installation of scheduler module is is looking forplugin and causing this to fail.
Looking for directions to debug this further and how this can be resolved ? Any help?
Comment #26
DamienMcKennaI wonder if this was the problem?
Comment #27
DamienMcKennaIf anyone has reliable instructions for triggering this problem please let me know, I'd love to solve it, thank you.
Comment #28
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commentedTested the above patch, its not resolving this Issue.
The steps to reproduce are as below:
Step 1. Create a normal Drupal Install
Step 2. Add and enable metatag module
Step 3. Add and enable metatag_views module
Step 4. Ensure under
admin/structure/views/settings/advanced
metatag_display_extenderStep 5. Run
drush cex
and export all the configs.Step 6. Then try re running
drush si
and this should cause the error.Comment #29
DamienMcKennaComment #30
zakariabdc CreditAttribution: zakariabdc as a volunteer and commentedNone of the above solutions worked for me.
I tried: $ composer require drupal/metatag_views and it worked.
Comment #31
DamienMcKenna"metatag_views" isn't a separate package available on Packagist, so "composer require drupal/metatag_views" shouldn't have changed your composer files. It does suggest part of the problem might be the class autoloading, and possibly one priority over another.
I wonder if the priority for metatag_views was higher than the views priority, would that fix the problem?
Comment #32
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commented@zakariabdc I tired adding the composer dependency to the project as mentioned by you, and that does not fix the issue on
drush si
.yeah I agree with @DamienMcKenna on adding the module as a composer dependency, it do not make any difference.
@DamienMcKenna I tried changing the priority of the
metatag_views
in mycore.extension
file, but no even that do not help.I feel this has something to do with plugin dependencies not getting calculated properly and hence the metatag_views module is not getting added, not 100% sure on this though.
Comment #33
DamienMcKennaHow's about this?
Comment #35
DamienMcKennaThat suggests the dependencies can't be modified on a config object using the get()/set() methods. So what's the best approach?
Comment #36
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commentedThe patch in #33 is also not helping to solve the
drush si
issue.Comment #37
tdnshah CreditAttribution: tdnshah as a volunteer and at Acquia commentedHi All,
Still struggling to resolve this, requesting direction towards the resolution or even a work around would help for now ?
Thanks in advance..
Comment #38
DamienMcKennaI think the first step would be to add a new install profile that adds Metatag Views to the install profile, then we can have something to debug.
Comment #39
DamienMcKennaGoing to try creating an install profile..
Comment #40
DamienMcKennaWIP.
Comment #41
DamienMcKennaWe first need to make the tests fail.
Comment #42
gilmord+1 for this to be solved, I face exactly the same issue with simple_sitemap also, looks like the problem is general and more likely related to core as multiple modules struggling with it
Attaching the issue in case it will be solved earlier
Comment #43
AaronMcHaleAs far as I can tell, at least part of the issue is that the metatag_views module lists views as a dependency (which makes sense), but that means when installing from a profile, Drupal will try to install Views before installing Metatag Views, and with the `metatag_display_extender` plugin is listed in the `views.settings` config, at the point where Drupal tries to install Views, it sees that but because Metatag Views isn't installed at this point, as far as Drupal is concerned the metatag_display_extender plugin does not exist, so it fails.
Off the top of my head I can't think of a clean way around this.
Comment #44
DamienMcKennaSo maybe Views shouldn't cache its list of display extenders as a config object? Maybe this is ultimately a core issue?
Comment #45
DamienMcKennaI opened a core issue for this: #3387596: views.settings config object should not be used to cache list of display extenders
Comment #46
DamienMcKenna