Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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..
Comment | File | Size | Author |
---|---|---|---|
zen_version.patch | 1.12 KB | naxoc |
Comments
Comment #1
Garrett Albright CreditAttribution: Garrett Albright commentedI 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.
Comment #2
jeffschulerThis still happens in 6.x-2.0-beta10.
I see the version checking code has been changed from using
$theme->info['version']
to usedrupal_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 withhook_system_info_alter()
to find the version string via CVS info.Comment #3
Garrett Albright CreditAttribution: Garrett Albright commentedBecause 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?
Comment #4
naxoc CreditAttribution: naxoc commentedIt 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?