After installing Token and Pathauto, I started noticing this error "Some of the pending updates cannot be applied because their dependencies were not met." when I tried to run the update.php script. So I uninstalled them completely, but I continued to get the same error. Searching for solutions I ran across a couple of other people using Ubercart who had fixed their problem by completely uninstalling Ubercart and reinstalling it:
Same Issue
Posted by perebcn on March 28, 2011 at 2:35am
The same issue here, I installed Drupal 7 from scratch, and suddenly, I cannot update using update.php, the same error message:"Some of the pending updates cannot be applied because their dependencies were not met.". I don't receive any information about the dependent modules neither when I run update.php nor in the logs section. Where can I find information about de dependent modules that doesn't allow me to run update.php?
reply
Try disabling and uninstalling data
Posted by mattwad on March 28, 2011 at 8:51pm
I was getting this very unhelpful warning for a while on my dev site and I believe it had to do with installing and re-installing Ubercart a few times. Finally, It turns out, disabling was not enough - I disabled all of Ubercart's modules but the error did not disappear until I uninstalled the data (these appear on the Uninstall tab of Modules after you disable them).
Re-enable modules and the error did not come back :)
—Matt
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1111524-uc_cart_update_last_removed.patch | 501 bytes | longwave |
| #2 | hulrm.patch | 6.28 KB | tr |
Comments
Comment #1
ericdjohnson commentedJust replicated mattwad's findings by cloning my site and then uninstalling Ubercart. Only after uninstalling the data did the update.php stop giving me the error.
Comment #2
tr commentedI responded to this issue when it was first brought up on ubercart.org, and I asked the original poster to move it here into the issue queue if it continued to be a problem. Never heard back... See http://www.ubercart.org/forum/bug_reports/21071/upgrade_latest_developme... for my completely unsubstantiated theory of why this happens and what to do about it.
If you're willing to put in a little work, maybe you can confirm that my fix works for you too. Or not - that would at least eliminate one possiblity. Follow the instructions in that thread; here's a patch you can use for one of the steps:
Comment #3
longwave#915216: "Some of the pending updates cannot be applied because their dependencies were not met." looked relevant, but was fixed by the Drupal 7.0 release. However, comments #17 and #18 seem pertinent:
This is perhaps the problem here, because IIRC hook_update_last_removed() wasn't present in early Ubercart 7.x-3.x releases. But I am not sure how we can fix this for existing users without just removing the hooks...
Comment #4
longwave#834848: Warning message regarding hook_update_last_removed() is not displayed is a core bug which is also relevant - this would have helped pinpoint Ubercart as the source of the problem, so people experiencing this might like to contribute to that issue.
If someone who is experiencing this issue can install the patch from #4 in that issue and report back with what update.php now says, that would help us fix this for everyone.
Comment #5
ericdjohnson commentedThanks TR! I'll give your fix a try.
Comment #6
ericdjohnson commentedI gave the patch a shot and I was still getting the error. But there are a couple of things:
1. That was the first time I have applied a patch (I'm new to Drupal) so I may have effed something up. I did a couple of spot checks on the files that patch was targeting and it looked like it had commented out the correct functions. I flushed the cache, ran cron, and then tried running update.php and got the same message. Let me know and I can post my patched ubercart folder.
2. The other thing is that I'm running this test instance of drupal in a different folder on the same server as my production install. It's pointed at a different database, but could this be causing the patch to not be picked up for some reason (maybe caching?).
Comment #7
Starminder commentedStuck on this one. I see the patch, but, ...is there another way?
Comment #8
longwaveWe need to know which submodules of Ubercart have caused this issue in order to try and fix it. If someone who is seeing this can apply the patch at http://drupal.org/files/issues/display_last_updated_warning_1.patch and then run update.php, they should see messages like this:
"[name] module can not be updated. Its schema version is [number]. Updates up to and including [number] have been removed in this release."
Full copies of those messages will help debug this further.
Comment #9
Starminder commentedI uninstalled UC completely, but still had the issue. In the end for me it was XML Sitemap that was blocking and an (unnecessary) update that wasn't being applied to devel performance.
More discussion same subject in this thread: #834848: Warning message regarding hook_update_last_removed() is not displayed
In the end I can neither confirm or deny UC was even causing my issue. I can say for anyone in a similar boat the provided patch at #3 in cited thread was kind of the key for me getting out of it.
Comment #10
lyricnz commentedWhile the fix in #834848: Warning message regarding hook_update_last_removed() is not displayed does help in some situations, it may not help here: if you have an upgrade problem AND there are no pending schema updates, you will not see a message. This is described in #1159160: Error messages from update.php sometimes hidden.
Comment #11
brucec commentedI can also confirm Matt's findings. It was Ubercart for me, try disabling and uninstalling data, as disabling is not enough.
To uninstall the data (it will be gone, you'll need to re-enter), after you disable all Ubercart modules, on the modules page click the Uninstall tab and sequentially uninstall the data for each module (you may need to go back to the uninstall page a few times as you get through the layers of dependant modules)
Re-enable modules, and the error went away. Advise to run cron, flush caches, and update, then enter your new content.
Comment #12
longwaveReproduced this with an older Ubercart 3 database. uc_cart was installed when hook_update_last_removed() or hook_update_N() were not present in the .install file, so it ended up with schema version 0.
The attached patch checks for this scenario in uc_cart_update_last_removed(). This should not affect upgrades from D6 as they will already have a higher schema version.
This may affect any Ubercart install from March or earlier, and may also arise in other submodules in the future that currently have no hook_update_N() functions.
Comment #13
tr commentedJust uc_cart, or should this be done wherever we have a hook_update_last_removed()?
Comment #14
longwaveuc_cart was the only one that was affected in my installation. Adding it to all modules might be unnecessary, and may have the side effect of breaking the upgrade path from really old D6 versions - I'd have to go back and check when hook_update_N() was first added to each module.
Ideally we need feedback from other users that are experiencing this problem; since Drupal 7.2 fixed the message display during update.php, hopefully we can now get some useful data - unless they are also affected by #1159160: Error messages from update.php sometimes hidden
Comment #15
lyricnz commentedI'm still experiencing issue with D7.2 and ubercart 7.x-3.0-beta3
"uc_cart module can not be updated. Its schema version is 0. Updates up to and including 6202 have been removed in this release. In order to update uc_cart module, you will first need to upgrade to the last version in which these updates were available."
Site was originally installed on 7.x-3.0-beta2 (I think, before my time, and I didn't get their history) then subsequently updated to 7.x-3.0-beta3. There was no new hook_update_N between those releases, but uc_cart_update_7000() was changed to delete a few more variables. Sheesh!!
For me, the (dodgy) workaround was executing uc_cart_update_7000() manually then updating the schema in the DB to 7000. Execute following PHP (I used /devel/php)
Comment #16
longwave@lyricnz: Are you able to test or review the patch in #12? The idea is it should work around the "Its schema version is 0" message for that specific case.
Comment #17
longwaveAlso, uc_cart_update_7000() was added in a single commit (28fd487e) and has not been changed since, according to http://drupalcode.org/project/ubercart.git/blame/refs/heads/7.x-3.x:/uc_... (commit c7b3e59b changed whitespace only, no code).
Comment #18
lyricnz commentedI didn't look at the change too carefully - it was just a couple of lines of diff at the bottom of the _update_N. Okay, whitespace, I retract my "sheesh" :)
Comment #19
lyricnz commentedYes, I rolled back my DB, and applied the patch in #12 - worked for me. schema_version is now 7000. RTBC based on that.
Comment #20
longwaveCommitted.
If this recurs with any other uc_* module, please reopen this issue with a copy of the error message from update.php (if any).
Comment #21
NPC commentedPatch in #12 solves it for me too, thank you very much!
(it was quite a process getting here, from two core issues and their patches, I am glad I made it :))
Comment #23
ju1i3 commentedI'm getting the problem now. I had a lot of problems upgrading from D6 to D7, including my host environment and not being able to run update.php. I have moved the site from Claranet to Heart, reinstalled everything afresh (Drupal 7.4, UC 7.x-3.x.dev) and receive error message:
Warning: array_intersect(): Argument #2 is not an array in uc_catalog_uc_store_status() (line 420 of /home/sites/glassassociation.co.uk/public_html/sites/all/modules/ubercart/uc_catalog/uc_catalog.module).
and
when I run update.php:
"Some of the pending updates cannot be applied because their dependencies were not met."
When I enabled the catalog module and some other UC optional modules (shipping quotes, flatrate, etc) I received error message:
"FieldException: Attempt to create an instance of a field taxonomy_catalog that doesn't exist or is currently inactive. in field_create_instance() (line 453 of /home/sites/glassassociation.co.uk/public_html/modules/field/field.crud.inc)."
When I try to edit a product I receive error messages:
" Notice: Undefined index: required in field_default_form() (line 75 of /home/sites/glassassociation.co.uk/public_html/modules/field/field.form.inc).
Notice: Undefined index: description in field_multiple_value_form() (line 155 of /home/sites/glassassociation.co.uk/public_html/modules/field/field.form.inc).
Notice: Undefined index: required in field_multiple_value_form() (line 177 of /home/sites/glassassociation.co.uk/public_html/modules/field/field.form.inc).
Notice: Undefined index: required in field_multiple_value_form() (line 206 of /home/sites/glassassociation.co.uk/public_html/modules/field/field.form.inc)."
I don't want to remove my UC data as I have over 100 products.
Comment #24
ron williams commentedAfter applying the above patch, I still continue to receive the following errors:
uc_cart module
uc_cart module can not be updated. Its schema version is 6201. Updates up to and including 6202 have been removed in this release. In order to update uc_cart module, you will first need to upgrade to the last version in which these updates were available.
uc_order module
uc_order module can not be updated. Its schema version is 6015. Updates up to and including 6016 have been removed in this release. In order to update uc_order module, you will first need to upgrade to the last version in which these updates were available.
Looking at my database, the schema versions listed are correctly listed above. The patch appears to only affect use cases where the schema version is 0. When I did the D6 to D7 upgrade, a few months ago I believe I upgraded to the latest UC version, but that could be the cause of my issue.
Comment #25
ron williams commentedThis appears to be caused by an upgrade from 6.x-2.4 to 7.x-3.x-dev. 6.x-2.4 does not include the updates which are part of 6.x-2.x-dev.
I would still like feedback to see what the best upgrade path should be for users with the recommended version.
Comment #26
tr commented@Ron Williams: Please read http://drupal.org/upgrade
You can't just upgrade from 6.x-2.4 to 7.x-3.x-dev. You have to upgrade to the most current version of 6 FIRST before you upgrade to 7. This is true of all Drupal modules, and of Drupal itself. The errors in #24 are correctly indicating that you didn't do that.
Comment #27
ron williams commentedSince my latter issue is caused by an unrelated bug, I have added a bug report: #1214726: Broken Upgrade Path For Drupal 6 to 7
Comment #28
ju1i3 commentedI'm still getting problems with Ubercart. I still have the
"Some of the pending updates cannot be applied because their dependencies were not met." error message when I run update.php.
When I try to display the status report I get:
"PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ti.tid IS NULL AND td.vid = '3'' at line 1: SELECT COUNT(DISTINCT n.nid) FROM {node} AS n LEFT JOIN {taxonomy_index} AS ti ON n.nid = ti.nid LEFT JOIN {taxonomy_term_data} AS td ON ti.tid = td.tid WHERE n.type IN () AND ti.tid IS NULL AND td.vid = :vid; Array ( [:vid] => 3 ) in uc_catalog_uc_store_status() (line 425 of /home/sites/glassassociation.co.uk/public_html/sites/all/modules/ubercart/uc_catalog/uc_catalog.module)."
When I try to add a new product the drop-down for taxonomy term it only says "none". This is mentioned elsewhere (will find reference).
I just installed Ubercart 7.x-3.x-dev (12-11-2011 version) hoping to solve some of these problems but no change. Are any of the patches above still relevant for that version?
Comment #29
ju1i3 commentedComment #30
longwave@ju1i3: Can you try the patch from #1159160: Error messages from update.php sometimes hidden and let us know which updates could not be processed? We can't help without knowing which module is affected.
#1074906: Warning: array_intersect(): Argument #2 is not an array in uc_catalog_uc_store_status() is related to the other error you reported.
Is this an upgrade from Drupal 6? If you still have a backup of the original database, would you be able to send me a copy privately so I can attempt to reproduce and fix these issues?
Comment #31
ju1i3 commentedI did upgrade months ago (in May). I will send you the backup from then.
I will try the patch you referred to.
I'm not getting the array intersect error message any more.
thanks!
Comment #32
longwave@ju1i3: Many thanks for the database backup, it will take me a little while to find time to look at this but it will be very useful in testing and fixing the D6 > D7 upgrade path.
Comment #33
ju1i3 commentedpatched update.php throws out:
uc_cart module
uc_cart module can not be updated. Its schema version is 6201. Updates up to and including 6202 have been removed in this release. In order to update uc_cart module, you will first need to upgrade to the last version in which these updates were available.
uc_order module
uc_order module can not be updated. Its schema version is 6015. Updates up to and including 6016 have been removed in this release. In order to update uc_order module, you will first need to upgrade to the last version in which these updates were available.
I'm not sure where that leaves me. Installing an old(er) version of Ubercart, I imagine, would throw up other probs? And which version?
At this point I wonder if I should uninstall and start again? I didn't want to re-enter all my products but maybe I have to.
Comment #34
longwaveWhich version were you upgrading from? At present we only support upgrades from 6.x-2.7 to 7.x-3.x.
Comment #35
ju1i3 commentedI'm embarrassed to say, I don't know off-hand. I did upgrade from 6 to 7 back in May and generally kept all contributed modules up-to-date (before and after) so whatever was current then. I don't know if you can tell easily from the db I sent.
I also had problems running Drupal 7 on a Claranet shared hosting package (in May when I upgraded). When I ran update.php I got
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request."
They denied all responsibility and there was nothing else I could try with php.ini, etc. so I tried moving the site to Heart and it ran fine (at least update.php!). It's possible that during this time the Ubercart updates did not run, therefore leaving the db in the state it's in now. (sorry, I only remembered this issue this morning)
Comment #36
ron williams commented@longwave - Is 6.x-2.7 the only supported upgrade path now? I am curious as the 6.x-2.x-dev version is currently newer than the 6.x-2.7 release and according to http://drupal.org/node/1111524#comment-4713546 the proper upgrade path would be to upgrade to "the most current version of 6 FIRST."
Just trying to clarify so other users understand what they need to upgrade to before going to D7.
Comment #37
longwave6.x-2.7 or 6.x-2.x-dev should be suitable for upgrading at present; "the most current version" means the current stable release but -dev should also work. Any notes on upgrades, successful or not, are welcome (preferably posted as separate issues). Hopefully with ju1i3's database I can run some more tests and then officially document the upgrade path, including which versions are supported, perhaps including 6.x-2.6 or even 6.x-2.4.
Comment #38
ron williams commentedRegarding my issue from http://drupal.org/node/1111524#comment-4713254: Should I have created a new issue for this problem? I agree that the latest stable release is the most current version, but TR clearly disagreed with that statement. 6.x-2.4 definitely does not work as an upgrade path unless the items in my post have been added to a 7.x release.
Comment #39
longwavePartially backported the two updates to 7.x so upgrades from 6.x-2.4 should now work, and fixed a related bug in the uc_catalog upgrade path.
@ju1i3: Your backup was very helpful, but it doesn't seem to fully upgrade to Drupal 7, and this doesn't appear to be Ubercart's fault. Several fields including the catalog taxonomy fail to be upgraded correctly, and I have yet to work out why. Marking this issue fixed again as the original issue is fixed, but if I get more time I will try to figure out what's going on here.
Comment #40
ju1i3 commentedThanks very much for looking at it.
I'm going to uninstall Ubercart and start again.
Comment #43
Infinitee commentedLongwave @ #39 Did this problem ever get worked out? I have a site that is having update problems stemming from taxonomy and the uc_catalog module.
7004 - Move taxonomy vocabulary associations for nodes to fields and field instances.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7005 - Migrate {taxonomy_term_node} table to field storage. @todo: This function can possibly be made much faster by wrapping a transaction around all the inserts.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7006 - Add {taxonomy_term_data}.format column.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7007 - Add index on {taxonomy_term_data}.name column to speed up taxonomy_get_term_by_name().
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7008 - Change the weight columns to normal int.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7009 - Change {taxonomy_term_data}.format into varchar.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7010 - Change {taxonomy_index}.created to support signed int.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
7011 - Drop unpublished nodes from the index.
This update will been skipped due to the following missing dependencies: uc_catalog_update_7002
uc_catalog module
uc_catalog module can not be updated. Its schema version is 0. Updates up to and including 8 have been removed in this release. In order to update uc_catalog module, you will first need to upgrade to the last version in which these updates were available.
Comment #44
asb commentedAccording to #39 from November 2011, "upgrades from 6.x-2.4 should now work".
Tried that with an upgrade from 6.x-2.18 to 7.x-3.13 which did not work (among other issues, I got the problem with the the insufficient schema version for catalog which was reported over a decade ago).
Could anyone who managed a successful upgrade please give some feedback which versions were working for the databse updates?
Thanks!