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.
Not 100% sure if this is critical, but it totally breaks the site, so..
When enabling the image.module on a upgraded site that had D6's image.module installed, Drupal does not install the schema because it thinks that the module has already been installed. This leads to pretty fatal table not found errors all over the place. Re-installing the module works, but is not exactly user friendly :)
Proposed solutions:
- Remove image.module from system table during upgrade
- Add a update function to image.module that is basically hook_install() if the tables are not yet there.
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal.image-schema.3.patch | 3.04 KB | Berdir |
#2 | drupal.image-schema.2.patch | 565 bytes | sun |
Comments
Comment #1
catchSeems critical enough to me, image.module has many thousands of users.
Comment #2
sunomg.
The only viable way I see would be to add a update function to both core and image module (empty there).... d'oh, fatal error, omgomgomgomg
Alright. Add one update function to core that installs the new schema. At the same time, only add a comment to image.install in contrib to skip this update number.
...will break if the contributed module needs to add some updates. So let's make that update number high enough.
---
ok, just attached the patch, and now I realize that sites/all/modules/image has to be removed (or replaced) prior to upgrading to Drupal 7. image.info, image.install, image.module must not exist, or Drupal won't load the core files.
So this patch probably works, but the high number is probably not needed.
Comment #3
BerdirIsn't that wrong? For example, if we add an additional column to a image.module table and a update function which would add that, 7099 would install the table with that attribute and 7100 would try to add it again.
See http://drupal.org/node/150220
Comment #4
catchYes especially in this case we'll need to redeclare the full schema definition.
Comment #5
BerdirOk, renamed the update function to 7000 (D6's image.module will have a different name in D7 or not exist at all or am I wrong? Also, Drupal will only include one image.module/install anyway) and duplicated the schema definition. I've also added a (single) tableExists() call to only create the tables if they aren't yet there.
Comment #6
catchD6 image.module can't exist in D7, at least not on the same site, so I think we're good here.
Comment #7
sunI agree. If this will need further tweaks, separate issue.
Comment #8
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.