Port Zen to Drupal 7

alanburke - August 29, 2009 - 12:21
Project:Zen
Version:7.x-3.x-dev
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hi John, all.
Code freeze for Drupal 7 core is almost upon us [Sep 1].
Moshe launched the Drupal 7 CX move to avoid the problem Drupal 6 faced, where there was a dearth of contrib modules when Drupal 6 was released.
http://cyrve.com/d7cx
http://drupal.org/project/modules?solrsort=sort_title%20asc&text=d7cx&di...

A number of themes have also joined in
http://drupal.org/project/themes?solrsort=sort_title%20asc&text=d7cx&dis...

As one of the many users of Zen, I would like to have it ready for Drupal 7 ASAP.
Do you have any plans?
I pledge to test the port where I can.

Is there a roadmap for the 6-2 branch?

Alan

#1

fenstrat - September 9, 2009 - 03:08

I'll also put my hand up to test a 7.x branch.

I'd also be nice to have a roadmap of where the 6.2 branch is headed. A while ago I found a todo list for 6.x-2.x but can't seem to relocate it (was it in the issue cue?).

The release notes on 6.x-2.x-dev This code is stable, but not well documented. haven't been all that true of late with major modifications taking place. Most of these seem to be flowing back from d7 work.

So I guess the question is will 6.2 have a realease pre d7 and will this release form the basis of the d7 branch?

#2

cultiv8 - September 16, 2009 - 15:51

I can help with testing and can donate for the D7 port as well. Any chance it can be ported before Nov 1?

For quick reference, here's an overview of theming changes in D7:

http://drupal.org/update/theme/6/7

#3

cultiv8 - September 29, 2009 - 02:25

bumpity bump.

#4

rjbrown99 - October 29, 2009 - 01:14

I installed D7 today to play around with it. I also popped the Zen 6.x-2.x theme in to see what might be needed. I got as far as reading all of the theming changes related to the .info file region definitions and redefining them appropriately. I wound up with something looking like this:

regions[content]         = Content
regions[sidebar_first]   = first sidebar
regions[sidebar_second]  = second sidebar
regions[navbar]          = navigation bar
regions[page_top]        = content top
regions[page_bottom]     = content bottom
regions[header]          = header
regions[footer]          = footer
regions[help]            = Help

At that point you can at least have the theme available for enabling in the UI, but it looks like it will be a number of hours of work to get everything updated. I'm going to play around with it, but I'm also hoping one of the core Zen theme developers will decide to look at it as well.

Thoughts? Anyone else interested in actually doing some of the dev work? Would the authors consider forking a new -dev branch for 7.x to start the integration process?

#5

Onopoc - November 7, 2009 - 05:41

+1 to port to Drupal 7. I would be happy to contribute testing.

#6

JohnAlbin - November 7, 2009 - 07:18
Category:feature request» task

I'm very, very close to releasing a 6.x-2.0-beta1. When I do that I'm going to create a DRUPAL-6--2 branch and move 6.x-2.x-dev to that branch. Then I'll create a 7.x-3.x-dev release node off of HEAD.

#7

geerlingguy - November 10, 2009 - 08:16

That would be oh-so-nice. The architectural changes of late have been making a couple of my subthemes scream bloody murder ;-)

As soon as 7.x work is done on Zen, I'll work on spiffy-fying my other themes for 7.x... I can definitely help with testing.

#8

JohnAlbin - November 10, 2009 - 09:11

Ok. DRUPAL-6--2 branch has been created. 6.x-2.x-dev release node now points at that branch instead of HEAD.

And HEAD has been minimally updated so that the .info files use core = 7.x. And I've created a 7.x-3.x-dev release.

There's tons of stuff in Zen 2 that needs to be ripped out because its already in Drupal 7, so the 7.x-3.x-dev will be horribly broken until the port is finished.

#9

seutje - November 10, 2009 - 11:24
Status:active» needs review

went over the base theme (didn't do starterkit) until I got it working properly, and removed some stuff that I know went into core now, like process stuff, clearfix and #341140: drupal_get_filename() when database is down, does not deal with phptemplate themes

I'm not sure how much you, John would like to keep these things as they are implemented by core and how many/which you would like to reform in what way or any of that stuff

with this patch, it should work properly and use the new core fancypants as it should be used, there might just be some things left where Zen druplicated (pretty much) exactly what core is already spitting out

oh btw, that build_mode stuff going on in zen_preprocess_node, is that still needed? core already provides it in $vars['elements']['#build_mode'] afaik

AttachmentSize
zen-to-7.patch 25.06 KB

#10

JohnAlbin - November 10, 2009 - 16:14
Version:6.x-2.x-dev» 7.x-3.x-dev

Oh, excellent! A big fat patch! My favorite gift! (Well, besides beer.)

I'll take a look at this patch this week.

#11

seutje - November 10, 2009 - 18:12

ups I forgot version :(

Most was actually removing things that you implemented in Zen that ended up in core (or were these backports?) which made it relatively easy compared to other popular base themes I've been looking into porting

You'll most likely notice I did not eliminate _zen_path() as I don't know if you intended it to be replaced by drupal_get_path('theme', 'zen') everywhere or still serve as a wrapper around the static, also because I've found instances of drupal_get_path('theme', 'zen') but I just assumed it was already properly handling it in that context in D6

I'll probably be looking into this some more tomorrow as it's a holiday \o/
so I'll try to have a swing at starterkit as well

Don't worry, the beer will follow :)

#12

franz - November 12, 2009 - 00:09

suuuubscribe

#13

franz - November 12, 2009 - 01:26

Rolled the patch for the actual version

Converted to unix format as welll.

Will test soon.

AttachmentSize
zen-d7.patch 25.58 KB

#14

marcvangend - November 14, 2009 - 00:15

Subscribe! (With the intention to help when possible :-))

#15

JohnAlbin - November 28, 2009 - 11:54

Sorry, been busy. I will take a look at this patch in the next week. Thanks, guys! :-)

#16

mgifford - November 30, 2009 - 03:04

I applied the patch in #13.

http://drupal.org/update/modules/6/7#drupal_set_content

Zen is no ordinary theme. Had to make this change here:

template.php: $output .= drupal_get_content($region);

I also got PHP Fatal error: Unsupported operand types in drupal-cvs/includes/theme.inc on line 812

Think there's a change for variable types that's tripping that up.

#17

marcvangend - November 30, 2009 - 09:22
Title:Port to Drupal 7» Port Zen to Drupal 7

(Adjusting the title because the tracker pages don't have another way show the project name.)

#18

JohnAlbin - November 30, 2009 - 11:58
Status:needs review» needs work

Ok! I committed seutje's patch after making a couple of tweaks. Thanks, seutje! There was lots of good stuff in that patch.

I also spent a couple hours and made some additional changes that get us much closer to closing this issue.

Things are still not 100%. I didn't get a chance to review carefully the $classes_array stuff going on in template.php; there is probably a lot of duplication.

But we're way closer then we were before. yay!

#19

JohnAlbin - November 30, 2009 - 12:05

Also, a quick look at a test site shows that comments, tabs and main menu needs work.

#20

seutje - November 30, 2009 - 12:37

sweet, thanks! This will make it a lot easier to work on this

/me ditches his temporary repo copy

 
 

Drupal is a registered trademark of Dries Buytaert.