Follow-up to #1277908: Introduce UUIDs onto panes & displays for better exportability & features compatibility. See http://drupal.org/comment/8430929#comment-8430929
Because the UUID functions were moved to Ctools, people updating Panels can get "Fatal error: Call to undefined function ctools_uuid_generate()"
The following patch ensures that update won't run in that situation:
https://drupal.org/files/issues/panels-uuid_update_dependency-1277908-14...
However, we also want to account for people who already have Ctools (e.g. for Views), and then install Panels using the current dev release.
We could set dependencies[] = ctools (>1.3) in panels.info, but I've no idea how that behaves for -dev versions; the documentation doesn't cover it.
We might possibly need a recognisable "-alpha" ctools release to reference; but as dev snapshot releases do have version strings of sorts, they might be sufficient?
The current ctools snapshot says "7.x-1.3+30-dev"
So is this valid and correct for our purposes? dependencies[] = ctools (>=1.3+30-dev)
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | panels-uuid_update_dependency_gte14-2187433-19.patch | 963 bytes | jweowu |
| #19 | panels-uuid_update_dependency_gt13-2187433-19.patch | 962 bytes | jweowu |
Comments
Comment #1
jweowu commentedComment #2
jweowu commentedRevised patch. Untested.
Comment #3
tim.plunkettLooking at https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_..., we can't use anything except 7.x-1.4.
I think we might need to roll a release just with that, and then focus on a full release in #2129033: [Meta] CTools 7.x-1.4 release
Comment #4
jweowu commentedYes, unfortunately the following returns
NULL, which is the "everything's fine" result.drupal_check_incompatibility(drupal_parse_dependency("ctools (>=7.x-1.3+30-dev)"), "1.3")So we either need to depend on ctools 1.4, OR we need to tag the current ctools dev version with a recognised label, such as
7.x-1.4-alpha1which will work in a dependency.Comment #5
jweowu commentedI would recommend applying the original patch (with just the update hook ammendment) ASAP, however. That will prevent the more serious problem -- the one likely to affect more people -- which is having the panels update hook run but fail to do what it was supposed to do!
Comment #6
jawi commentedsame issue here on updating to latest dev version of 31-jan-14.
Is this the best way to solve any issues?
https://drupal.org/files/issues/panels-uuid_update_dependency-1277908-14...
Or better downgrate to dev module of 21-jan-14 ?
Comment #7
jawi commentedOriginal patch of #5 does not work.
Patch https://drupal.org/files/issues/panels-uuid_update_dependency-1277908-14... Delivered the following error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smulfun.cache_panels' doesn't exist: TRUNCATE {cache_panels} ; Array ( ) in cache_clear_all() (line 165 van /home/~/smulfun.nl/public_html/includes/cache.inc).
Comment #8
jweowu commentedJawi: that sounds unrelated, but I can see that panels_update_7303 adds that table, so presumably you need to run (or re-run) the updates.
Did you run updates before, and encounter "Fatal error: Call to undefined function ctools_uuid_generate()" during the update?
Or did you simply forget to run updates in the first place?
If it was the former, could you please take note of whether panels_update_7302 runs again this time?
Comment #9
liza commented@jweowu
nope. i got the same error as Jawi.
btw: i applied the patch because i got the initial error in this issue thread; but i had done the CTOOLS dev update that was pinged a day or two ago. so for all intent and purposes, PANELS is reading my CTOOLS as if it were an old version when in fact it isn't.
could this be related to the 7303 update failure?
Comment #10
jweowu commentedliza, are you still seeing "Fatal error: Call to undefined function ctools_uuid_generate()" ?
If so, could you please verify that the function
ctools_uuid_generate()does exist in your ctools.module file?If it does, check the
systemtable of your database, and verify that the file path for ctools is what you think it is.Updates 7302 and 7303 are not related. (And in fact, let's keep discussion of update 7303 and
cache_panelsout of this issue. If there's any genuine problem with that update, it needs to be raised in a separate issue.)Comment #11
jerry commentedSaid issue has been opened as #2188277.
Comment #12
liza commentedthanks for following up jweowu. after following your instructions, i found two issues with my build:
(1) the error for update 7302 was due to CTools. i didn't have the correct CTools and that's because i updated to the latest PANOPOLY distribution. am opening up an issue over there to bring it to their attention.
(2) the errors i was getting with update 7303 were due to the CONTEXT module. i had to completely disable it in order for drush to process the database properly. i'll open an issue over there as well.
so to recap: once i updated my CTOOLS to the latest dev and disabled the CONTEXT module, the updated was processed without a problem.
Comment #13
jawi commented@ #12 Thanks for your best practices. With your gidelines I fixed the update issue as well.
This issue was a pain in the ass - but in the end it is caused by an unpleasant coincidence.
Comment #14
liza commented@Jawi
Awesome! am glad i could help. i also spent several hours trying to debug this :P
Comment #15
japerrySorry for the issues you guys saw! Unfortunately such is life on cutting edge dev.
When we release ctools and panels next week, the info file will require ctools > 1.3, but unfortunately we cannot do that right now.
Comment #16
jweowu commentedPatch revised accordingly.
If the new version of ctools is going to be 1.4 (rather than an alpha or beta), it would seem nicer to specify
(>=1.4)rather than(>1.3), so I've added both versions.Comment #19
jweowu commentedThat's what I get for editing patch files directly.
Let's try that again...
Comment #20
damienmckenna"CTools" is spelled with a capital 'T'.
Comment #21
japerryFixed and rolled into panels before release!
Comment #22
jweowu commentedjaperry: I see now that you didn't commit the change to
panels_update_7302()The reason I added that code was that I didn't think the new .info file dependency was sufficient to prevent a site with a pre-existing ctools <= 1.3 from running that panels update hook if the new panels was downloaded without the new ctools. And we absolutely want to prevent the update from running in that situation.
Was my assumption wrong? (I didn't test it, so it would be useful to know either way.)
Comment #23
japerryjweowu -- I didn't notice it until it was too late. I think your assumption was right, and is in the patch for #2188277: "cache_panels doesn't exist" error on update
oh well. we'll be rolling panels 3.5 here in a few days it looks like