Line 62 in zenophile.module uses $theme->info['version']; to find the version of the zen theme installed. But the version info is only available if one downloaded the zen theme from the d.o project page. The packager adds the version info, so it is not available if one checked the zen theme out with CVS.

I found a solution, but it is not too pretty. It will attempt to get the version number from the CHANGELOG.txt file in zen if it finds no version number. It works - but if someone removes CHANGELOG.txt, it doesn't anymore..

CommentFileSizeAuthor
zen_version.patch1.12 KBnaxoc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Garrett Albright’s picture

I agree, that's ugly.

A better solution would probably be to do an isset() on $theme->info['version'] and display a "use at your own risk" message if FALSE.

Beta 4 was really sort of a rushjob to get something out that would work with Zen 1.1, which broke a lot of assumptions Zenophile had made (particularly with how to find the location of the STARTERKIT theme directory). In the near future, I'm probably going to refractor things a little so the code isn't so presumptuous. I'll keep this patch in mind, but hopefully it won't be necessary.

jeffschuler’s picture

Version: 6.x-2.0-beta4 » 6.x-2.0-beta10

This still happens in 6.x-2.0-beta10.

I see the version checking code has been changed from using $theme->info['version'] to use drupal_parse_info_file()... That's still relying on d.o. packing script info and doesn't fix the problem.

Actually makes it worse: the nice thing about using $theme->info['version'], is that you could install the CVS Deploy module to avoid the issue here -- CVS Deploy jumps in with hook_system_info_alter() to find the version string via CVS info.

Garrett Albright’s picture

Because I'm lazy and it was simple to do, I added some tweaks so that, if the version string isn't found in the .info file, the module throws a warning, but continues assuming you're using Zen version 2.0. Please give it a test once the packaging robot has made a new snapshot - or, hell, just check it out from CVS, since you guys know how to do that. Will that be sufficient? Is anyone using Zenophile with a CVS checkout of the 1.x branch, just to make things difficult?

naxoc’s picture

It is working fine for me with the assumption that I am running 2.0.

There is probably someone using it with 1.0 out there but I figure that a warning is enough?