Running the latest metatag update scripts breaks with an error:

Fatal error: Class name must be a valid object or a string in /includes/common.inc on line 7749

Before the error happens, I do see a series of log messages like

Update 7004: 200 records were updated in total.

It seems that Update 7004 fails to complete?

Comments

morningtime’s picture

temporarily "fixed" by skipping update 7004 and continuing from 7005.

laura s’s picture

Title:Cannot run update.php, breaks on invalid Class name» Module update fails on #7004

Rephrasing the issue title.

Update attempt with Drush on Beta4:

The following updates are pending:

metatag module :
  7004 -   Update all language values in the metatag table, will also resolve problems  created during the release of beta3.

Do you wish to run all pending updates? (y/n): y
Performed update: metatag_update_7004                                                                                                                                    [ok]
Performed update: metatag_update_7004                                                                                                                                    [ok]
Performed update: metatag_update_7004                                                                                                                                    [ok]
Performed update: metatag_update_7004                                                                                                                                    [ok]
Performed update: metatag_update_7004                                                                                                                                    [ok]

Fatal error: Class name must be a valid object or a string in /[path-to-dev]/html/includes/common.inc on line 7749
Drush command terminated abnormally due to an unrecoverable error.                                                                                                       [error]
Error: Class name must be a valid object or a string in /[path-to-dev]/html/includes/common.inc, line 7749
The external command could not be executed due to an application error.                                                                                                  [error]

I downloaded latest Metatag -dev release. Still failure:

The following updates are pending:

metatag module :
  7004 -   Update all records in the metatag table and assign each the correct language  value, will also resolve problems created during the release of beta3. This  might take a while, depending on how much data needs to be converted.
  7005 -   Removing wrong metatag watchdog entries that break the adminreportsdblog  page.
  7006 -   Remove metatag records that were added by old versions of the module for  entities that don't actually support meta tags. A more complete version of  this will be added later on after it's (hopefully) guaranteed that all  modules have updated to the correct API usage.
  7007 -   Remove metatag records for objects that have been deleted; older versions of  Metatag may have failed to purge these.
  7008 -   Remove metatag any empty records that may be hanging around from old  releases.

Do you wish to run all pending updates? (y/n): y

Fatal error: Class name must be a valid object or a string in /[path-to-dev]/html/includes/common.inc on line 7749
Drush command terminated abnormally due to an unrecoverable error.                                                                                                       [error]
Error: Class name must be a valid object or a string in /[path-to-dev]/html/includes/common.inc, line 7749
The external command could not be executed due to an application error.                                                                                                  [error]
Finished performing updates.                

Running update.php yields a drupal_set_message() error:

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://example.com/update.php?op=selection&token=_4sKC2pjKGoq73HNrdH1NK6OT083ZN75renuu-o8r_Q&id=230&op=do StatusText: OK ResponseText: Fatal error: Class name must be a valid object or a string in /[path-to-dev]/html/includes/common.inc on line 7749

There's a prompt to take me to the error page, but then I'm taken to a success screen:

Update #7004

    50 records were updated in total.

However, if I go back to update either by update.php or drush up, update 7004 is still prompted as necessary.

Last bit of info: Watchdog entries:

  • Update 7004: 66 records to upgrade.
  • Update 7004: 50 records were updated.
  • Update 7004: 50 records were updated in total.

And yet repeating the process generates the identical messages. The counts do not change.

I hope this info is helpful.

drupalsteve’s picture

I am seeing the same error prompt as described above.

Nicolas Bouteille’s picture

Is it possible to skip an update from the UI without using drush ? I can update any other module now. I was thinking to uninstall Meta tags and reinstall it unfortunately there are to many nodes having custom descriptions and i can't find the table where theses descriptions are stored so that i can copy paste them.

Nicolas Bouteille’s picture

Ok I was able to install updates from other modules by disabling metatags and deleting the module folder.
Now I would like to resolve that bug and I am willing to completely uninstall Meta tags and recreate all my custom descriptions if needed but i need a way to list all pages that use one and save them in a way. The metatag table in the database is not clear for me. I was thinking to do it with views but the metatag fields are not available... How can I make a summary of all my custom descriptions and titles before I erase everything ?

Thank you

laura s’s picture

Noting that it's becoming apparent that this may be the same issue as #1844638: metatag_update_7004 goes into an infinite loop. There's a patch pending there. (I can't test it anymore. I uninstalled and reinstalled Metatag with no problem, and moved on.)

DamienMcKenna’s picture

Status:Active» Closed (duplicate)

This is ultimately a duplicate of #1844638: metatag_update_7004 goes into an infinite loop, lets focus on that issue.