FAQ - LOOOOOK.... your question might already be documented!
- My 7.x-2.x theme has no whitespace between regions and columns, aka no gutters
- Invalid argument warnings in at_build_panels_layout_css() when I save the theme settings
- Breadcrumbs are not displaying or showing weird behavior
- Gpanels / footer panels etc are stacking
- Images are no longer flexible
Not answered? Ok here's my brain-dump on things that probably need to happen
These are notes I am compiling to detail how to upgrade a sub-theme, they should not be treated as complete, this is a work in progress and I am jotting down issues as they come to mind or I run into them.
The 7.x-3.x core theme has many underlying changes and improvements, however the process for upgrading is relatively strait forward - mostly due to 7.x-3.x providing backwards compatibility where it can.
This is my rough list for now, there are two - the first is to merely get a 7.x-2.x theme to run OK on AT Core 7.x-3.x, the second list is for an actual full upgrade.
7.x-2.x sub-themes will run out of the box and will not blow up, but it won't be optimal and some theme settings will not work as expected.
If you can think of anything else or run into any issues please post a comment, I may have overlooked something.
Things to make 7.x-2.x themes run OK on 7.x-3.x
- add release to theme info (7.x-2.x, not actually required, but good practice)
- and release conditional to theme-settings.php
- move default font to html element, usually this was set on body
- add theme settings so the new settings have a default - use automagical info generator
- check layout, especially gutters are working OK
- add $classes variable to page.tpl.php
- we cant remove the theme settings CSS just yet, only on a proper upgrade, so could be issues here with inheritance/cascade etc
Face the fact that some things are going to cock up.
Upgrading to 7.x-3.x
- add release to theme info (7.x-3.x)
- remove old theme settings now handled by AT Core
- check theme settings defaults - use automagical info generator
- check theme settings are all working as expected
- check layout especially gutters
- remove the loaders from template.php, most are not needed, only the IE loader
- remove body classes, only keep what is required by the sub theme, otherwise is now handled by AT Core
- move any other required classes to the correct preprocess function (unlikely but possible)
- add $classes variable to page.tpl.php
- remove most the the custom theme settings CSS, most is now handled by AT Core, except the custom featuers such as rounded corners, textures etc
Comment | File | Size | Author |
---|---|---|---|
#7 | screenshot.png | 53.75 KB | jenyum |
#7 | screenshotfoo.png | 53.08 KB | jenyum |
Comments
Comment #0.0
Jeff Burnz CreditAttribution: Jeff Burnz commentedTypos and formatting not optimal
Comment #0.1
Jeff Burnz CreditAttribution: Jeff Burnz commentedadd to faq
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedNote that eventually this will become a book page, for now the FAQ will be compiled into comment #2 until I get time to build a book page.
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedFAQ
1. Gutters
All current 7.x-2.x themes will have no gutters when you first upgrade to 7.x-3.x. This is because the CSS has been moved from the core theme to the sub-theme, and for most sub-subthemes this does not exist as they use the default. Upshot? Your subtheme will appear to have no white space between regions, columns etc.
How to fix?
Drop this into your sub-themes CSS, doesnt really matter where, probably in something like
style.base.css
:Don't want to edit code? There is another way...
Turn on the Extensions (under the Settings tab), then turn on "Markup Overrides", then set a value for the gutters, probably something like 10 or 20, then save the theme settings, bingo, you know have your gutters back. These gutters from theme settings should always override whatever you put in CSS file, so be aware of that.
2. Warning: Invalid argument supplied for foreach() in at_build_panels_layout_css()
You will get this warning if you try to save the theme settings for your older sub-theme without first making sure there is something selected for each of the Panels layouts.
To stop this warning from appearing just make sure you have something selected for each Panel layout, you can also copy/paste some default settings into your themes info file, which should silence them (you must clear the cache), such as:
3. Breadcrumbs are not displaying, or showing weird behavior
Breadcrumbs require a theme settings update in the info file, replace what you have with the following and clear the sites cache.
You have experienced some really odd behavior with breadcrumbs displaying or not displaying, etc etc, its all tracable back to the need to update the theme settings. See this issue: #1535852: Missing breadcrumbs after moving to D7 for more info.
Some markup changed so your CSS might not apply cleanly, see this issue - there is a patch that should make it clear what needs to be done: #1648110: Port breadcrumb CSS to match 3.x markup. Some themes use a
.breadcrumb class
- I changed this to.breadcrumb-wrapper
to enforce consistency across all themes.4. Gpanels / footer panels etc are stacking
If you are using any Gpanel you will need to update some or all of the code for those Gpanels.
If you are using a 2 or 3 column Gpanel you can just add the class "at-panel" into the main wrapper for the panel, for example, like this:
If you are using a 4, 5 or 6 column Gpanel in your theme you will need to update the entire snippet. New wrapper markup was added to support the new responsive options for these Gpanel layouts. You can find all the snippets in :
adaptivetheme > at_core > layouts > gpanels
The region names have not changed, everything will continue to work, this issue only affects layout.
5. Images are no longer flexible
The flexible image CSS was moved from AT Core to the actual sub-themes in 7.x-3.x, this was done so sub-themers could more easily override it or remove it if they didn't want it, the downside is it needs to be added to all the existing styled themes - you can do this by adding this snippet of CSS to your themes CSS, doesnt really matter where, as long as its in there somewhere. If your theme has something like a base or html-elements CSS file that is a good candidate:
Comment #3
jenyum CreditAttribution: jenyum commentedI am attempting to use Corolla and Footheme on top of Adaptive Theme 7.x-3 (needed the ability to turn off all responsiveness, so upgraded). When I save my settings in Footheme I get the following errors:
Warning: Invalid argument supplied for foreach() in at_build_panels_layout_css() (line 80 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.builders.inc).
Notice: Undefined variable: these_groups in at_build_panels_layout_css() (line 85 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.builders.inc).
Warning: Invalid argument supplied for foreach() in at_build_panels_layout_css() (line 85 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.builders.inc).
Notice: Undefined variable: these_selectors_styles in at_build_panels_layout_css() (line 90 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.builders.inc).
Warning: implode(): Invalid arguments passed in at_build_panels_layout_css() (line 90 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.builders.inc).
Also, my google fonts (although available as a setting) seem to be completely missing. I cannot figure out where to change the following: (but I'm assuming it's related?)
"move default font to html element, usually this was set on body" - in what file would this be located and what code should I place where in order to do this? For the life of me I can't find the initial html tag anywhere in the template files.
I haven't customized the template files at all, just the CSS.
If I could get these issues sorted I could get Footheme up and running well enough to use with Adaptivetheme 7.x-3 for now.
Thanks.
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedThis is because there is nothing selected for each Responsive Panel setting, because there are no default settings in these older sub-themes. To silence the warnings select something for each Panel layout.
Google Fonts have changed, there is no longer a hard coded list, you have to enter the name of the font in the text field. This was done because its too hard to maintain a list of fonts and this new system is more flexible.
Nope, nothing to do with entering or selecting Google fonts at all. This is referring to the CSS declaration for the "default" font.
Comment #4.0
Jeff Burnz CreditAttribution: Jeff Burnz commentedreformat faq
Comment #4.1
Jeff Burnz CreditAttribution: Jeff Burnz commentedfu
Comment #5
jenyum CreditAttribution: jenyum commentedThanks, just selecting something for each panel style made the warnings go away. (I have responsiveness turned off so I don't need these styles, didn't occur to me to set them.)
On Google Fonts: I still see the drop down selector on the Footheme settings page. Is there a new theme-settings.php for Corolla? I don't see any 7.x-3 versions.
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedI need to check these things, there are so many changes with fonts and how that whole system of Google fonts works, what you are seeing is the form supplied by Corolla, but if you turn on the Extensions in "Settings" then turn on Fonts you will see the new stuff. I think that is where the confusion is coming from - its just not documented and I need to update Corolla to work with the new system (it will work, mostly...).
I'll see if I can kill those warnings if responsiveness is turned off, good point, that shouldn't really happen.
Comment #7
jenyum CreditAttribution: jenyum commentedI turned on the fonts extension and I now get a new error: (when saving settings in footheme)
Notice: Undefined variable: font_family in require_once() (line 100 of /var/www/html/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.fonts.inc).
I tried setting the fonts in AT Core, didn't produce an error but it also didn't have any effect. The font settings section for footheme is still looking different from AT Core. I also tried setting the fonts in Corolla, which just resulted in the return of Invalid argument supplied for foreach() in at_build_panels_layout_css() until I set the panel layouts again and saved.
I've attached screenshots of the fonts extension settings in AT Core, and Footheme/Corolla.
Thank you for being so quick with the debugging on this.
Comment #8
Jeff Burnz CreditAttribution: Jeff Burnz commentedFrom that screenshot I think you are using either the 7.x-3.x beta1 or an alpha release, please use the DEV, the latest bleeding edge version, you might still get issues but there is no point in testing on old versions. Ideally use GIT to pull the very lastest code all the time.
You shouldn't even have AT Core enabled, setting anything inside it does nothing for your subtheme. I would turn it off I if were you , there's just no point in having it on (I have never turned it on, ever, not even once).
I have fixed those warnings and now the theme will validate the Panels layouts and trow a warning message that tells the user to set them or add the info file stuff, so that is all fixed now and committed to DEV.
Comment #9
jenyum CreditAttribution: jenyum commentedWell, OK then. Updated to Dev and cleared cache. Fiddled with toggling extensions on and off.
No errors now, however still no Google fonts. If I set the font to a websafe style it displays just fine, if I set it to a Google Font I end up with Times New Roman. The font selection interface is still identical to the screenshot in my last post, for Footheme.
Comment #10
Jeff Burnz CreditAttribution: Jeff Burnz commentedah, I see now, yeah, that is always going to happen, looks like I used the same form keys in Corolla as the new system uses, so the forms in Corolla are blowing away the form supplied by AT Core. You'll have to wait until I update Corolla I'm afraid, or if you want to do some hacking try this: go into Corollas theme-settings.php file and remove the form elements from line 7 to 445, basically that's all the font and headings styles.
Comment #10.0
Jeff Burnz CreditAttribution: Jeff Burnz commentedx
Comment #11
Chimos CreditAttribution: Chimos commentedHi,
I'm going to use the Adaptive theme 3.x-dev version with the AT commerce 2.0-rc3 version.
Would it be moreless safe applying all these changes written above? Will be posible, then, to update AT commerce in the future if 3.x is relased?
Thanks
Comment #12
Jeff Burnz CreditAttribution: Jeff Burnz commentedIts mostly right, each theme is different, I wrote that list from "memory" of all the things I have done in sub-themes.
I'm happy to cut 3.x branches for all the sub-themes and do a quicky port for each theme, I can port AT Commerce in about 10 minutes to be honest (yes, its true), so why don't I do that and then open that up to the community for testing and improvements?
Comment #13
artatac CreditAttribution: artatac commentedSounds good - thanks
Comment #14
Chimos CreditAttribution: Chimos commentedOh my english language is precarious, sorry. Are you saying you are going to release AT Commerce 3 now? Or you say you want me to do it if I achieve it?
Sorry, I didn't understand right. Thank you
Comment #15
Jeff Burnz CreditAttribution: Jeff Burnz commentedThe initial port of AT Commerce is done, this should mostly be working and pretty stable, you might get an undefined index warning when you first enable the theme, consider this a known issue that needs a tweak which I ran out of time for right now.
http://drupal.org/node/1545418 (the release node for the new branch)
Remember, these can take up to 12 hours to show up in Drupal.org.
Chimos...
Yes, exactly, at least the development version, so you can use this, its 99% ported, with likely just a few minor tweaks required.
Comment #16
Chimos CreditAttribution: Chimos commentedI can't belive it. Oh tanks, oh thanks. Expect donation from me, if I can work a little!
Comment #17
dddave CreditAttribution: dddave commentedWell then, how about a new Corolla branch? Would love to test the frack out of it.
Comment #18
Jeff Burnz CreditAttribution: Jeff Burnz commenteddddave, the branch is there for Corolla (and Pixture Reloaded, Sky and Footheme), I just need to push the updated code and make a release for it, all the themes are pretty much ported, just need some basic testing before I make the commit. I was quite surprized, I got all the ports done in about 2 hours without much issues at all.
Comment #19
dddave CreditAttribution: dddave commentedJeff, you are doing an awesome job! Thanks!
Comment #20
marcoka CreditAttribution: marcoka commentedsome tip. i tried updating from 2 to 3 too. i somehow failed. i think it may be easier to use the at_subtheme and merge the changes of 7.2. I tried it the other way around and i did not succeed. may be easier in some cases.
Comment #21
marcoka CreditAttribution: marcoka commentedTemplates
preprocess_region sample
Comment #22
artatac CreditAttribution: artatac commentedI have just been playing with the 7.3 dev with the the 7.3 of AT-commerce and then trying to copy the Slidingdraw top block functionality into Pixture reloaded (failing but will keep trying!) but it made me want to ask if you would consider adding it to all the upcoming 7.3 sub themes? Afterall if people dont want it then it never shows. Just a thought and thanks from the community for all your great work
Comment #23
marcoka CreditAttribution: marcoka commentedBreadcrumbs
If you use a custom function to modify breadcrumb you need to adjust the checking of values get by
$show_breadcrumb = theme_get_setting('breadcrumb_display');
In 7.2 you could do:
if ($show_breadcrumb == 'yes') {
Now you need to do:
if ($show_breadcrumb == 1) {
Example
Comment #24
Jeff Burnz CreditAttribution: Jeff Burnz commentedGood point on the change in logic for breadcrumbs, I changed it too a checkbox because there are only two options I think this is the right widget as opposed to the previous select list. Now, back to the family ;)
Comment #25
Jeff Burnz CreditAttribution: Jeff Burnz commentedartatac - please open a new issue for your specific issue, thanks.
Comment #26
jenyum CreditAttribution: jenyum commentedJust dropping you a note to say that worked. (Eliminating lines 7 to 445 of theme-settings.php) Everything works now.
Comment #27
Jeff Burnz CreditAttribution: Jeff Burnz commentedCorolla 7.3 branch http://drupal.org/node/1550726
AT Commerce 7.3 branch is now published.
Comment #28
jenyum CreditAttribution: jenyum commented@Jeff Burnz, I get a "not authorized" when I try that link.
Comment #29
dddave CreditAttribution: dddave commenteddito
Comment #30
Jeff Burnz CreditAttribution: Jeff Burnz commentedYeah, it takes some time to become published, Drupal.org builds the development releases every 12 hours so could be a few more hours before it becomes active.
Comment #31
dddave CreditAttribution: dddave commentedFrag. Sorry, didn't check the time. Looking forward to check it out.
Comment #32
ptmkenny CreditAttribution: ptmkenny commentedJeff, thanks for posting updates so frequently. It's great to have such awesome support.
Will a branch of Pixture Reloaded also be following shortly or is that on hold right now?
Comment #33
Jeff Burnz CreditAttribution: Jeff Burnz commentedNothing is really on hold, its just a matter of finding the time. I'll try to scratch out some time to push PR and Sky. Any free time has been going into the core theme, thats the major point I suppose.
Comment #34
kingdee40 CreditAttribution: kingdee40 commentedJeff,
What's the road map for commercial themes?
Comment #35
Jeff Burnz CreditAttribution: Jeff Burnz commentedThe Roadmap for the commercial themes is the same, what I tend to do is push the free themes out first, for various development reasons this makes sense, and follow them pretty soon after with upgrades to the commercial themes. The upgrade process is actually very fast and easy so I am not anticipating any major delay or difficulties. Codex is already available on 7.x-3.x and the others will be within a the next two weeks, around the same time the actual core theme hits a stable release.
Comment #36
Jeff Burnz CreditAttribution: Jeff Burnz commentedI just created release nodes for both Pixture Reloaded and Sky, so within 24 hours both those should be live.
Please use the new RC or the DEV to run these on, the beta1 is out of date, especially with regards to Google fonts and many other incremental feature improvements (Google fonts changed a lot).
Comment #36.0
Jeff Burnz CreditAttribution: Jeff Burnz commentedbreadcrumbs link
Comment #36.1
Jeff Burnz CreditAttribution: Jeff Burnz commentedadd gpanels faq
Comment #37
Jeff Burnz CreditAttribution: Jeff Burnz commentedAll the free themes now have flexible image and gpanel code updates in DEV.
Comment #38
sailtexas CreditAttribution: sailtexas commentedHi Jeff,
I'm not a coder so please excuse the ignorance.
I'm using AT creating a a sub theme and after updating to 7.3 I'm getting this error:" Notice: Undefined variable:theme_key in titanfc_subtheme_preprocess_html() (line 50 of /home/titan/public_html/sites/all/themes/adaptivetheme/titanfc_subtheme/template.php)."
Please could you show me how to add the $classe variable for the theme key to my sub theme's template.php file?
Line 50 of my template .php currently shows "// Add class for the active theme name
$vars['classes_array'][] = drupal_html_class($theme_key);
// */"
Thanks mucho in advance.
Comment #39
Jeff Burnz CreditAttribution: Jeff Burnz commentedTexasWebPros: looks like a bug in 7.x-2.x, replace that line with this:
$vars['classes_array'][] = drupal_html_class('adaptivetheme_subtheme');
Where '
adaptivetheme_subtheme
' is your themes name.Comment #40
bredi CreditAttribution: bredi commentedwow. thank you for posting all this. Updating themes is always difficult.
Comment #41
kingdee40 CreditAttribution: kingdee40 commentedHey Jeff,
Just checking on the status on the commercial themes. I'm using AT Timeout and need to begin theming, I'd rather not update the 7.2x to 7.3 myself to avoid errors, are you planning on having the updated commercial themes available with the 7.3 stable?
Thanks for your hard work.
Comment #42
Jeff Burnz CreditAttribution: Jeff Burnz commentedYes for sure, I wanted to have all the commercial themes on 3.x before I released the base theme, however I am getting a lot of pressure to release the base theme now, so I am going to do that. Looks like a lot of double shifts coming in the next week to update all the commercial themes. I did the free themes first as a test, and they seem pretty good bar a few teething issues.
Comment #43
mvm3012 CreditAttribution: mvm3012 commentedNo more pressure. I like the idea of adaptive panels and adaptive design with fixed sidebars. Go in, if you will, signed by customers and commercial templates. I borrow the idea for my own template.
Comment #43.0
mvm3012 CreditAttribution: mvm3012 commentedadd flexible media link
Comment #44
mattbloomfield CreditAttribution: mattbloomfield as a volunteer commented