Hello,

I updated metatag module to latest version (7.x-1.11) and now its no way updating the databases. I tried it on my all sites on three different servers. It shows 10 pending updates and then crashes. When ran again it shows 9 pending updates and then it never completes and keep crashing.

Please help

Rugman

Attached two screen shots
1) After crash
2) List of pending updates showing up

Comments

Rugman created an issue. See original summary.

damienmckenna’s picture

Issue tags: -update.php not running

Please test the current -dev version, I made a small change to update 7040 that might alleviate the problem.

damienmckenna’s picture

Rugman’s picture

Dear Mr McKenna,

Thanks for your quick response

Regret, its still giving same results.

By the way, The dev version shows last update on 30-1-16. Hope you uploaded updated Dev.

Enclosed screenshots, please check

Regards,

Rugman

damienmckenna’s picture

Category: Bug report » Support request
Status: Closed (duplicate) » Active

The first error message says it's running out of memory - can you try bumping the available memory to e.g. 192mb?

gsquirrel’s picture

I am having a similar issue (unsure if it should be seperate issue apologies if so)

It is also with running update.php after updating to metatag 7.x-1.11 (not from previous one but from 7.x-1.7)

It says it cannot run updates due to "missing dependencies" which seems to be in error, the update it wants does not seem to be pending.

This is what the update script says:

7 pending updates (0 to be applied, 7 skipped)
metatag_opengraph module

7103 - Change og:video to og:video:url in all metatags.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7104 - Rename the 'og:video' meta tag to 'og:video:url' in the configs.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7105 - Clear the Metatag cache to pick up changes to og:video.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7106 - Clear the Metatag cache to pick up changes to og:audio:secure_url.
This update will been skipped due to the following missing dependencies: metatag_update_7100

metatag_twitter_cards module

7100 - Rename the 'twitter:image:src' meta tag back to 'twitter:image'. Sorry.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7101 - Rename the 'twitter:image:src' meta tag back to 'twitter:image', part 2.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7102 - Clear the Metatag cache.
This update will been skipped due to the following missing dependencies: metatag_update_7100

Should I then try updating to dev version instead? Or maybe just roll back to 7.x-1-7?

Thanks

damienmckenna’s picture

@gsquirrel: If it can't find metatag_update_7100 then are you sure you updated the module correctly? That update was included in v7.x-1.8, so could the site's metatag.install file be from the previous 1.7 release? Please try removing the Metatag module's files entirely, downloading 7.x-1.11 and then trying the updates again. Alternatively, try downloading the -dev version, it includes a fix that'll make update 7040 quicker.

gsquirrel’s picture

Thanks for the response.

I updated via drush, and the install file was dated Jan 26th 18:04 so I don't think that is it, maybe the issue was in going straight from 1.7 to 1.11 i could try doing 1.8 first maybe..

I have reverted to 1.7 for now though.

I did not get any of the memory errors as I don't think whatever 7040 was trying to fix applied to the site I am working on.

Rugman’s picture

Hi,

The memory was released full to 256M on first instance of this error.

Thanks

Rugman

damienmckenna’s picture

Priority: Critical » Normal

@gsquirrel: I tried out your scenario locally - I uninstalled the module, switched back to 7.x-1.7, installed the main module, Metatag Open Graph and Metatag Twitter Cards. I then updated to the latest -dev release and it shows the following db updates available:

$ drush updb
 Metatag                7107  Fix the global config translation strings.
 Metatag_opengraph      7103  Change og:video to og:video:url in all metatags.
 Metatag_opengraph      7104  Rename the 'og:video' meta tag to 'og:video:url' in the configs.
 Metatag_opengraph      7105  Clear the Metatag cache to pick up changes to og:video.
 Metatag_opengraph      7106  Clear the Metatag cache to pick up changes to og:audio:secure_url.
 Metatag_twitter_cards  7100  Rename the 'twitter:image:src' meta tag back to 'twitter:image'. Sorry.
 Metatag_twitter_cards  7101  Rename the 'twitter:image:src' meta tag back to 'twitter:image', part 2.
 Metatag_twitter_cards  7102  Clear the Metatag cache.

So again I don't see what could have caused the problem you saw. I'll be releasing 1.12 today with some other updates, please test it out when it lands.

Rugman’s picture

Dear Sir,

What about errors I am facing?

Kindly help

Rugman

gsquirrel’s picture

It looks to me the problem is "Metatag_twitter_cards 7100 Rename the 'twitter:image:src' meta tag back to 'twitter:image'. Sorry. " fails because it requires itself to already be run?

damienmckenna’s picture

@gsquirrel: You're reading that incorrectly - it requires metatag_update_7100 to run first, not metatag_twitter_cards_7100.

damienmckenna’s picture

@Rugman: Please try adding this to your site's settings.php file:

ini_set('memory_limit', '256M');

Then test out the latest -dev release and let me know how it goes.

gsquirrel’s picture

Ok - but that one is not in your list above? The only one with that number is the cards one?

Your list is the same as mine but none of mine would run because they all depend on this missing metatag_update 7100 ?

Sorry but am still confused. I haven't had a chance to try incremental updates yet, it is live site and client very twitchy about any errors.

damienmckenna’s picture

@gsquirrel: You might see if you can set up a copy of the site somewhere to test. Also, when you update make sure you delete *all* of the existing Metatag files, like I said the only reason that it should have been saying it couldn't find metatag_update_7100 was that there was an older copy of metatag.install on the site.

chrsnlsn’s picture

StatusFileSize
new108.36 KB

Ran into this problem yesterday updating from 7.x-1.7 to 1.11 this morning I removed entire folder re-downloaded with drush and was able to successfully run the update script attaching screenshot of the 14 updates that ran.

damienmckenna’s picture

@chrsnlsn: Thanks for your report.

Rugman’s picture

Hi,

(1) added:
ini_set('memory_limit', '256M');
with other ini_set commands in settings.php of the concerned site.

(2) Reconfirmed with Hosting support that memory is 256M
(3) Downloaded Dev version dated 3.2.16

Unfortunately even it didnt worked.

Am sure you would find some way out

Keenly await your solution

Thanks

Rugman

damienmckenna’s picture

@rugman: are you able to run Drush? If so, can you please try running the "drush updatedb" command to see what errors it gives? Alternatively, please post an updated screenshot of the error message it shows from the update.php page. Thanks.

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

FYI I've just released v7.x-1.12 that includes the updates and fixes made in the past ~10 days, please give it a try if you're still having problems.

Rugman’s picture

StatusFileSize
new50.97 KB
new20.08 KB

Dear Sir,

Updated to Latest Version,

The error is still coming up.

Attached is Two Images

One - Error Message after update event
Two - Error Page details after Update

Hope it helps

Thanks

Rugman

Rugman’s picture

StatusFileSize
new110.24 KB

More Info on Drupal Installation Specs

damienmckenna’s picture

Title: Update.php not running » Update 7040 running out of memory
Version: 7.x-1.11 » 7.x-1.13

@Rugman: The "Out of memory (allocated 164626432)" part of the error message indicates that the update.php file is being limited to 164mb, so there's something strange going on with your hosting. Do you have anything set up in the settings.php file to change the PHP memory_limit value depending upon different conditions, e.g. to use more memory on different pages or paths?

Alternatively, see if you can run Drush commands when you're logged into the server via ssh and run the updates from there.

Another option would be to update the {system} table to set the 'schema_version' value for Metatag to 7040, that way it won't try to run it again.

Rugman’s picture

Dear Sir,

I reconfirm

(1) Memory variable in Php.ini on server set to 256M
(2) Memory set to 256M in settings.php for the concerned site.

I have never changed any other value of standard drupal installation except htacesss and robots files.

I am running 30 sites and changing all of them through database would not be easy task.

Does Php version makes any effect? I think its 5.3

Thanks

Rugman

damienmckenna’s picture

@Rugman: It *should* still work under PHP 5.3.. Hrm. Does it still say there are a whole bunch of records to update for 7040?

Rugman’s picture

Dear Sir,

Yes, It still shows the error message. Not sure what to do.

Can we remove update 7040 by deleting any file?

Thanks

Rugman

damienmckenna’s picture

You can add "return;" to the top of that update script to just skip it.

Rugman’s picture

Hi,

Where is update script? I mean whats the name of file and where to find the said update

Thanks

Rugman

damienmckenna’s picture

@Rugman: it's metatag.install, look for metatag_update_7040, just change it to this:

/**
 * Nothing to see here.
 */
function metatag_update_7040() {}
sgdev’s picture

I attempted to update from 7.x-1.7 to 7.x-1.13, and had no success. I kept getting the following error messages:

metatag_opengraph module

7103 - Change og:video to og:video:url in all metatags.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7104 - Rename the 'og:video' meta tag to 'og:video:url' in the configs.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7105 - Clear the Metatag cache to pick up changes to og:video.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7106 - Clear the Metatag cache to pick up changes to og:audio:secure_url.
This update will been skipped due to the following missing dependencies: metatag_update_7100


metatag_twitter_cards module

7100 - Rename the 'twitter:image:src' meta tag back to 'twitter:image'. Sorry.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7101 - Rename the 'twitter:image:src' meta tag back to 'twitter:image', part 2.
This update will been skipped due to the following missing dependencies: metatag_update_7100
7102 - Clear the Metatag cache.
This update will been skipped due to the following missing dependencies: metatag_update_7100

So, I followed the recommendations on this thread:
* Increased memory to 512M. Did not work.
* Deleted the entire Metatag folder and used drush to re-download 7.x-1.13. Did not work.

To get it to work, I had to take the following steps:

  1. Deleted entire Metatag folder.
  2. Downloaded the old 7.x-1.7 version.
  3. Upgraded from 7.x-1.7 to 7.x-1.8; showed the same list of updates as above, although this time they applied without error.
  4. Upgraded from 7.x-1.8 to 7.x-1.13; this worked cleanly.
Rugman’s picture

Dear Sir,

Nothing Working even with latest dev download dated 26.02

Hope you would find a solution for that

thanks

rugman

gsquirrel’s picture

I also found that the updates worked from 1.7 to 1.8 as with ron_s above.

velocis’s picture

You can just skip update 7040 ?

Were trying to get to 1.14 or 1.16 so wouldn't the new code be looking for the robots->value now after the update in 7040 re formats the data, re-serializes it and writes the record again.

We kept getting failures:
The external command could not be executed due to an application error.

we were running the updates via drush, tried adding
# metatag.install 7040
if (drupal_is_cli()) {
$limit = 10; <----change this from 100 to 10
}

#settings.php to bounce the memory right up
if (drupal_is_cli()) {
ini_set('memory_limit', '1024M');
}

Even tried removing the entity_get_controller->resetCache to try and make it faster/more reliable still same thing.

So final question:

CAN YOU REALLY JUST SKIP THIS UPDATE ?

damienmckenna’s picture

Version: 7.x-1.13 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.64 KB

Does this work? Instead of loading all records at the beginning, this just loops through the records until they're all fixed. Note, I haven't tested it yet (I need to dig up an old copy of the site that has this data problem), but it should work, so make sure you test it on a copy of your site and not your production database :)

damienmckenna’s picture

Has anyone tested the patch above yet? I'll be happy to include it in the next release if someone can let me know if it works correctly.

  • DamienMcKenna committed 5e638e9 on 7.x-1.x
    Issue #2659906 by DamienMcKenna: Rewrote update 7040 to use less memory...
damienmckenna’s picture

Status: Needs review » Fixed

I found a site I had installed locally which was still an old version and was able to successfully test it.

Committed.

Please let me know immediately if you still have problems running the updates with the latest -dev version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

leo7’s picture

I already half a year does not hold update metatag module. Everything else works fine (drupal use for 6 years).

Posts:

An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.

Fatal error: Class name must be a valid object or a string in /var/www/shorosco/data/www/s.yari-design.ru/includes/common.inc on line 8026

The update process was aborted prematurely while running update #7041 in metatag.module. All errors have been logged.
The following updates returned messages
metatag module
Update #7040

No robots meta tags need to be fixed.

damienmckenna’s picture

@leo7: The error messages indicates your site hit an error running update 7041, not 7040, please open a new issue and I'll see if I can help you work out the problem with your site.

damienmckenna’s picture

@leo7: Actually, better yet, join in the discussions in #2694193: metatag_update_7041/metatag_update_7018 fails, can't update module.