Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Update db after updating module with drush failed. I can see this link https://www.drupal.org/node/2573869, is this is same problem in new version or I am doing something wrong. please suggest ?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#34 | metatag-n2658808-34.patch | 775 bytes | tommik |
#13 | metatag-n2658808-13.patch | 748 bytes | DamienMcKenna |
Comments
Comment #2
jas1988 CreditAttribution: jas1988 as a volunteer commentedComment #3
jas1988 CreditAttribution: jas1988 as a volunteer commentedComment #4
jas1988 CreditAttribution: jas1988 as a volunteer commentedComment #5
DamienMcKennaAre there any errors logged in Watchdog?
Comment #6
jas1988 CreditAttribution: jas1988 as a volunteer commentedThanks for your reply, but there are no such errors I can see but there I one post related to this I think http://drupal.stackexchange.com/questions/28824/error-when-updating-modu... Is this may be reason, what are your thoughts ?
Comment #7
jas1988 CreditAttribution: jas1988 as a volunteer commentedthere is info in logs which just say :
but noting else. please suggest ?
Comment #8
DamienMcKennaCan you please try running "drush updatedb -y -v" and then paste in what is output?
Comment #9
jas1988 CreditAttribution: jas1988 as a volunteer commentedPlease check this is what it shows:
Comment #10
DamienMcKennaWhat version of Drush are you using? And just to confirm it, did you upgrade from D6 to D7 with this site and then run the importer to convert Nodewords records?
Comment #11
jas1988 CreditAttribution: jas1988 as a volunteer commentedAbove are details having Drush version 8.0.1 and Drupal version 7.41. I have not done upgrade from 6 to 7. Site is running in D7 from 2 years.
PHP_VERSION 5.5.30
Thanks!
Comment #12
jas1988 CreditAttribution: jas1988 as a volunteer commentedFor more information I just did update of metatag module from Version: 7.x-1.7 to 7.x-1.11
Comment #13
DamienMcKennaSee if this helps - it changes the main query in update 7040 to exclude properly formatted robots values.
Comment #14
DamienMcKennaComment #15
jas1988 CreditAttribution: jas1988 as a volunteer commentedThanks for you all help but it seems like some problem or restriction with my server environment as on my local mac dev environment updates went very well with drush. I tried again with setting up same site on my local from backups.
Comment #16
DamienMcKenna@jas1988: Could you please test the patch? It ought to avoid the problem as it won't insist in updating the 39,000 records.
Comment #17
jas1988 CreditAttribution: jas1988 as a volunteer commentedIs that ok so that I can test it at production site. Please suggest!
Comment #18
DamienMcKennaYes, because that update isn't necessary for your site anyway.
Comment #19
jas1988 CreditAttribution: jas1988 as a volunteer commentedThanks I will do now and let you know!
Comment #20
jas1988 CreditAttribution: jas1988 as a volunteer commentedI am getting same error, patch did not helped.
Please suggest but I am not getting that why its working on local environment.
Comment #21
DamienMcKennaCan you please try running this query in mysql?
Comment #22
jas1988 CreditAttribution: jas1988 as a volunteer commentedI got 0 records :
mysql> SELECT COUNT(*) FROM metatag WHERE data LIKE '%:6:"robots";%' AND data NOT LIKE '%:6:"robots";a:1:{s:5:"value";%';
+----------+
| COUNT(*) |
+----------+
| 0 |
+----------+
1 row in set (0.08 sec)
We have blocked nodes access in robots.txt like:
Disallow: /node/
Comment #23
DamienMcKennaOk, because the patch should have resulted in metatag_update_7040 saying "Update 7040: No robots meta tags need to be fixed." instead of "Update 7040: 38989 records to examine."
Comment #24
jas1988 CreditAttribution: jas1988 as a volunteer commentedSo what should I need to do now as my status reports keep saying database updates are required. Thanks!
Comment #25
DamienMcKennaGiven that update 7040 doesn't actually affect your site, you could just add "return;" to the top of the function.
Comment #26
jas1988 CreditAttribution: jas1988 as a volunteer commentedthanks managed like this to stop performing updates related to 7040 but I tried again with full content on local and it worked including 7040 updates as well. However those are not required in my case. Thanks again!
Comment #28
DamienMcKennaComment #29
interestingaftermath CreditAttribution: interestingaftermath as a volunteer commentedI am also having this issue. I've applied the patch but still seeing the same results:
With drush:
Although it says success, it still shows database updates and re-running `drush updatedb` confirms that these are still pending. Any ideas?
Comment #30
DamienMcKennaIf anyone is still having the problem can they please update to 7.x-1.13 and try again? Thanks.
Comment #31
interestingaftermath CreditAttribution: interestingaftermath as a volunteer commentedUpgraded to 7.x-1.13 and no change unfortunately
Comment #32
DamienMcKenna@interestingaftermath: Can you please try adding the "-v" argument to Drush to get more output and paste it in here, i.e. "drush updatedb -v"? Thanks.
Comment #33
interestingaftermath CreditAttribution: interestingaftermath as a volunteer commented@DamienMcKenna: Adding the -v argument and it worked. Even though I had run `drush updatedb` twice just before, adding `-v` took forever and finished successfully with no error. I'm thinking that it was a memory issue combined by the number of records it was attempting to update. By running it multiple times, it continued to cut down on the total number of records that needed update. Maybe I just got lucky that the same time I tried `-v` the number of records was down enough to work within the 512M php memory_limit. Crazy?
Comment #34
tommik CreditAttribution: tommik at Avoltus Oy commentedI got the "The external command could not be executed due to an application" error while updating Metatag module from version 1.6 to 1.13.
After changing the db_query() to db_select() with same conditions I managed to run database update successfully with drush 6.20.
Attached is a patch of the changes.
Comment #36
DamienMcKennaOh, that's just awesome, thanks tommik!
Comment #37
DamienMcKenna