Category update does not show current in updates page

desiree - March 23, 2009 - 21:16
Project:Category
Version:6.x-2.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Every time I update the category module (latest update installed is 6.x-2.0-beta2), it does not show the correct update in Home/Administer/Reports/Available updates:

Category 6.x-2.0-alpha4
Recommended version: 6.x-2.0-beta2 (2009-Mar-05) Download Release notes

Includes: Category, Category display, Category menu, Category re-save, Wrapper: book, Wrapper: taxonomy

This is an issue only with the Category module. Other modules' updates are reported correctly.

Please advise
Thanks in advance

#1

desiree - July 20, 2009 - 22:32
Version:6.x-2.0-beta2» 6.x-2.0-beta3

I just updated to version 6.x-2.0-beta3 dated 05-31-2009 and in my updates page I still get an error under Category to update"

Category 6.x-2.0-alpha4
Recommended version: 6.x-2.0-beta3 (2009-May-31) Download Release notes

Includes: Category, Category display, Category menu, Category re-save, Wrapper: book, Wrapper: taxonomy

No other module has this problem and updates are posted correctly.

#2

JirkaRybka - July 21, 2009 - 19:43

I never used the update status module (in my opinion it makes no sense, given how much work is needed on some contribs before a new release is usable on live site - re-doing various hacks and fixes - so I really don't want other admins with less insight be prompted to attempt upgrades themselves...) Anyway, since I don't use that, I never saw the problem, and I don't really know how it works internally.

Looking at the .info files in Category package, I have a suspicion, though: The big difference between Category and the rest seems to be presence of the Wrapper modules. These don't have any version in their info files (because they ship as taxonomy.info.php and book.info.php - so Drupal packaging script doesn't see them and doesn't add the extra information). So, the update status code doesn't have any way to tell whether these Wrapper modules are updated or not. I suspect that the alpha4 version have something to do with the version getting cached somewhere at the moment, when you first installed the wrapper? I can't see it anywhere in beta3 files (grep yielded nothing).

So, I might suggest to try the following: Append the beta3 additional information to category/wrappers/taxonomy/taxonomy.info and category/wrappers/book/book.info - just paste the second block from other .info files in category package, to the end of these files - like this:

version = "6.x-2.0-beta3"
core = "6.x"
project = "category"
datestamp = "1243766716"

It shouldn't do any harm anyway, and if that helps, we might try to roll a patch later. Also I'm not sure whether it's necessary to run update.php or not, to get the new "version" recognized. Just guessing, really.

#3

JirkaRybka - July 21, 2009 - 19:55

Also: Are the wrappers really upgraded? There is some renaming going on, while installing the wrappers, so if you only just copy new codebase over the old one, the old wrappers are not overwritten/updated. There are runtime files like taxonomy.module, but a fresh category package only have taxonomy.module.php

So it probably should be a part of upgrade process, to un-install all wrappers before the upgrade, and install again afterwards (maybe a mention is needed in #484084: Update README.txt and friends, if that's really the case). Or else, just delete the old files, and rename new ones (removing .php) - that's what the installer script does anyway.

But I guess that the mentioned lack of version inside .info files is more likely the problem.

 
 

Drupal is a registered trademark of Dries Buytaert.