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?

CommentFileSizeAuthor
#16 zen1.patch15.01 KBKrisBulman
#8 zen1.patch18.88 KBjohnalbin
#8 subtheme.patch2.32 KBjohnalbin
#7 zen1.zip397.2 KBJimNastic

Comments

mkmagu’s picture

you 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.

cpc4’s picture

And 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?

megachriz’s picture

You 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

ccrackerjack’s picture

I'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.

ccrackerjack’s picture

I 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.

ccrackerjack’s picture

I 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.

JimNastic’s picture

StatusFileSize
new397.2 KB

Great 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

johnalbin’s picture

Version: 6.x-2.0-beta1 » 6.x-2.0
StatusFileSize
new2.32 KB
new18.88 KB

I 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.

Tony Sharpe’s picture

#7 worked fine for me. Thanks JimNastic

EastWan’s picture

Status: Active » Fixed

#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!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

arebos’s picture

i agree with john. but how to implement these patch?

johnalbin’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Component: Miscellaneous » Documentation
Category: support » task
Status: Closed (fixed) » Needs work

Re-opening. We need to document this.

KrisBulman’s picture

I 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:

 // $Id: theme-settings.php,v 1.6 2008/09/15 09:59:03 johnalbin Exp $
 

in zen.info the time stamp is also missing

; $Id: zen.info,v 1.11.2.1 2009/05/07 17:58:44 johnalbin Exp $

izmeez’s picture

subscribing

KrisBulman’s picture

Version: 6.x-2.x-dev » 6.x-1.2
StatusFileSize
new15.01 KB

here is a working patch for the 6.x-1.x release currently available for download on git and on the release page

KrisBulman’s picture

I 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:

  1. zen1 patch in #16 applied to a new download of zen1.1, the patched theme was moved to sites/all (see below for how patch was applied)
  2. Garland was temporarily set as the default theme on any multisites using a zen1 theme
  3. any zen1 subthemes located in sites/sitename/themes/ were patched using a modified patch from #8 (only modified to reflect the subtheme name) ... a search replace for zen/zen1 on template.php, theme-settings.php and theme_name.info would also have been sufficient
  4. original unpatached zen1 base themes were deleted from all local sites/sitename/themes/
  5. site caches were cleared and the original themes were re-enabled

zen1 patch was applied by dropping the patch file inside the zen folder downloaded in step 1 (via git clone), then running:

git apply zen1.patch

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)

nodecode’s picture

subscribing

johnalbin’s picture

Status: Needs work » Closed (fixed)

Closing