Hello.

After update module from 8.x-1.0-beta3 to 8.x-1.0-beta5, I see this error (page: admin/config):

One or more problems were detected with your Drupal installation. Check the status report for more information.

Go to status report and see this:

Entity/field definitions:

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.

Metatag defaults
— Создать тип сущности Metatag defaults.

And front-end of my site go down after launch update.php with message:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 1 passed to Drupal\metatag\MetatagToken::__construct() must be an instance of
Drupal\Core\Utility\Token, instance of Drupal\Core\Extension\ModuleHandler given, called in 
/home/site.com/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 269 and defined in 
Drupal\metatag\MetatagToken->__construct() (line 29 of modules/metatag/src/MetatagToken.php).

Administration pages working fine, front-end not working... How to fix it?

Comments

Vikky Shostak created an issue. See original summary.

koddr’s picture

Issue summary: View changes
koddr’s picture

Issue summary: View changes
damienmckenna’s picture

Status: Active » Fixed

To fix the last issue you need to clear the site caches or run core/rebuild.php. That should then let you run update.php which should fix the other issue.

koddr’s picture

DamienMcKenna, still show this message (on white background):

The website encountered an unexpected error. Please try again later.

UPD:

After delete module (from server) and upload old version (8.x-1.0-beta3) site working fine (error gone)...

damienmckenna’s picture

Status: Fixed » Postponed (maintainer needs more info)

@Vikky Shostak: Where do you see that error? Did you run rebuild.php? Did you run update.php?

koddr’s picture

@DamienMcKenna:

— Where do you see that error? — Everywere, but admin pages work fine.
— Did you run rebuild.php? — Yes. Not solved my problem. Simply refresh page.
— Did you run update.php? — Yes. Not solved my problem. After click button «Update», see error («The website encountered...»).

damienmckenna’s picture

You might try updating to beta4 first, then update to beta5.

koddr’s picture

@DamienMcKenna: I did this. Error still here.

After upload old version (8.x-1.0-beta3) error gone. I don't understand, what I did wrong?!

I install Drupal core 8.0.3 and Metatag module 8.x-1.0-beta1. Where release of Drupal core or modules — I do update. Metatag module stay on version 8.x-1.0-beta3 (I don't update site's modules some time). And now, I've Drupal core 8.0.5 and only working Metatag module 8.x-1.0-beta3.. without chance to update module in future!

damienmckenna’s picture

You didn't do anything wrong, don't worry.

Did you install the Token module? It's needed by Metatag beta5.

koddr’s picture

@DamienMcKenna, of course. Token module, 8.x-1.0-alpha2.

koddr’s picture

Install new version 8.x-1.0-bet6. Still have this problem...

hansfn’s picture

Version: 8.x-1.0-beta5 » 8.x-1.0-beta7
Status: Postponed (maintainer needs more info) » Fixed

One of my students got the error:

Recoverable fatal error: Argument 1 passed to Drupal\\metatag\\MetatagToken::__construct() must be an instance of Drupal\\Core\\Utility\\Token, instance of Drupal\\Core\\Extension\\ModuleHandler given, called in .../core/lib/Drupal/Component/DependencyInjection/Container.php on line 269 and defined in .../modules/metatag/src/MetatagToken.php on line 29

Installing the Token module fixed the issue. (Not sure how the student was able to install Metatag without Token - maybe after upgrading?)

Anyway, it seems the issue is fixed for 8.x-1.0-beta7

damienmckenna’s picture

Thanks for the update!

koddr’s picture

#13 Not solved my problem, `cause Token module is already installed on my site before Metatag!

koddr’s picture

Status: Fixed » Active
damienmckenna’s picture

Version: 8.x-1.0-beta7 » 8.x-1.x-dev

Does the problem persist with the latest release?

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

There are some other issues related to errors from updating, please keep an eye on them and we'll see if we can fix them.

damienmckenna’s picture

Does the problem still happen with 1.2 or even the latest dev snapshot?

sebby’s picture

I have get an error with the 1.2 version

PHP Fatal error:  Class 'Drupal\serialization\Normalizer\NormalizerBase' not found in /Users/sebmg2/Workspaces/uco/web/modules/contrib/metatag/src/Normalizer/FieldItemNormalizer.php on line 10

but with the 8.x-1.x-dev, I can't see the same error.

damienmckenna’s picture

damienmckenna’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Please let me know if the problem still happens. Thanks.