Closed (fixed)
Project:
Zen
Version:
6.x-1.2
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2010 at 11:06 UTC
Updated:
21 Aug 2013 at 13:42 UTC
Jump to comment: Most recent file
I currently run a 6.x-1.0-beta3 live on a site. (It never had an upgrade path)
I want to develop a 6.x-2.0-beta1 theme (hopefully this will have upgrade support), but how do I do this if both versions use a "base" directory of 'zen' in site/all/themes ?
1) How do I develop a 2.x theme while running a 1.x theme
2) Should the base folder be specific to the version? zen, zen2, zen3, etc?
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | zen1.patch | 15.01 KB | KrisBulman |
| #8 | zen1.patch | 18.88 KB | johnalbin |
| #8 | subtheme.patch | 2.32 KB | johnalbin |
| #7 | zen1.zip | 397.2 KB | JimNastic |
Comments
Comment #1
mkmagu commentedyou should create a dummy site for Development use and create the new theme there. This way you will not affect your live site with any of the changes you make.
Comment #2
cpc4 commentedAnd point the dummy site at the same database? It seems like I'm about to run into the beta / staging / production debacle.
How do I minimize the pain of transitioning to the new theme when it is ready?
Comment #3
megachrizYou should make a copy of the live database as well as your site.
1. Download the database to a sql-file.
2. Download all files of your site.
3. On your localhost, create a new database. Import the sql-file.
4. Store the files of your site on your local machine and change the settings.php-file so that it is pointing to the right database.
5. Develop your theme.
6. When you think your theme is ready, download the live database again, import it on your localhost (overwrite the database used at localhost) and test your theme again.
7. If everything went okay, put your live site into maintenance mode.
8. Download the live database again for backup in case something goes wrong when installing your new theme.
9. Upload your new theme and do a quick test on the live site.
10. If everything went okay, you can put your site back live. If something went wrong and you made changes to your website which can not easily be undone, put back your database backup.
If you don't know how to set up a local webserver, you could download and install XAMPP. http://www.apachefriends.org
Comment #4
ccrackerjack commentedI'm having the same problem.
I do not against to develop the new theme in another dummy site or local computer, but I prefer doing it in my live site since playing with the new theme do not affect the contents of my site nor other users. And I can preview the new theme with live data immediately.
I agree with cpc4 that using version number as folder suffix may solve alot of problem from upgrading, if it allows. Simply unzipping zen 2.x on top of zen 1.x doesn't work either. So is there any way to convert the old sub-theme become independent of zen by coping certain files from zen to the sub-theme, and what line of codes have to be amended?
Thanks alot.
Comment #5
ccrackerjack commentedI agree MegaChriz suggested a proper method for upgrading from zen 1.x to zen 2.x for the same sub-theme,
However...
1. If I'm going to use the same sub-theme (the same look), there's no point from upgrading
2. If I'm going to use a new sub-theme, then I can't switch back to the old sub-theme which is based on zen 1.x
We, and the users, always want more choices than less. We want to upgrade zen while still enable us to choose the old one when some don't seem to like the new one, which always happen.
Comment #6
ccrackerjack commentedI found a temporary solution for running both zen 1.x and zen 2.x together, that allow developing new sub-theme based on zen 2.x while keeping sub-themes using zen 1.x alive.
Actually its a very simple method: to rename all keywords "zen" to something else, such as "zen2", including folder name, file name, and all keywords in all contents of files.
Comment #7
JimNastic commentedGreat idea.
I have attached a zip containing the Zen 1.1 theme with every folder, file and usage of "zen" converted to "zen1". Dont forget to make the same update in your subtheme too. Then install Zen 2.0 next to it without a problem since all the folders, files and usage will be "zen" (not "zen1")
Cheers,
Jim
Comment #8
johnalbinI think the attachment in #7 might be a bit too drastic in its "zen" -> "zen1" global replace. If you modify the theme settings to be prefixed with zen1_ you would have to convert all the sub-themes to use those new setting names as well. While we would still need to do some modifications to the sub-themes requiring Zen 1, we can minimize that.
How about these patches?
The zen1.patch needs to be applied in the root zen directory and will modify the zen 1.1 to be called "zen1".
The subtheme.patch needs to be applied in the sub-theme's directory. The hunk that applies to STARTERKIT.info.txt should obviously be applied to the actual name of your sub-theme's .info file.
I haven't actually test them, but hopefully I have enough familiarity to be pretty close to the mark.
Comment #9
Tony Sharpe commented#7 worked fine for me. Thanks JimNastic
Comment #10
EastWan commented#8 works nicely. Remember to:
- use version 1.1
- to change STARTERKIT.info.txt to my_theme.info
- to search/replace STARTERKIT to my_theme in subtheme.patch before actually applying it
- to clear the cache(s) after these changes (otherwise you may get errors), preferably using "drush cc" (-> "all")
Thanks John!
Comment #12
arebos commentedi agree with john. but how to implement these patch?
Comment #13
johnalbinRe-opening. We need to document this.
Comment #14
KrisBulman commentedI dropped the zen1.patch from #8 in a newly downloaded zen-6.x-1.2.tar.gz
ran patch -p0 < zen1.patch
it failed on theme-settings.php and zen.info
in theme-settings.php, the timestamp at the top is missing:
in zen.info the time stamp is also missing
Comment #15
izmeez commentedsubscribing
Comment #16
KrisBulman commentedhere is a working patch for the 6.x-1.x release currently available for download on git and on the release page
Comment #17
KrisBulman commentedI had to do this on a production multisite as there were a number of zen1 and zen2 themes being used. Most zen themes were in local sites/sitename/themes/ folders.
the process went as follows:
zen1 patch was applied by dropping the patch file inside the zen folder downloaded in step 1 (via git clone), then running:
after the patch was applied, the zen folder was renamed to zen1 and placed in the sites/all directory along side the latest zen2 release (just called zen)
Comment #18
nodecode commentedsubscribing
Comment #19
johnalbinClosing