1

I'm trying to create a custom RWD theme with magento 1.9 and for some reason even after following this guide:

https://www.flinttechnology.co.uk/customising-rwd-magento-responsive-theme/

Its using the base theme as the fallback instead of the RWD theme. enter image description here

  • Can you add the contents of the theme.xml file to your question. app/design/frontend/yourpackagename/yourthemename/etc/theme.xml – ProxiBlue Feb 24 '16 at 23:50
  • And full path where you have it located – ProxiBlue Feb 24 '16 at 23:51
  • What do you have in "Default" section in system > configuration > design > theme section? – Adarsh Khatri Feb 25 '16 at 0:33
  • @AdarshKhatri nothing, what should I have in there? – Oli Tuck Feb 25 '16 at 0:34
  • @ProxiBlue in theme xml it literally just says rwd/default, in app/design/frontend/mypackage/default/etc – Oli Tuck Feb 25 '16 at 0:43
-1

UPDATE

As @ProxiBlue pointed my mistake, you need to put this in your theme/etc/theme.xml

<?xml version="1.0"?> 
   <theme> 
     <parent>rwd/default</parent>
   </theme>

and have empty in default section, unless you have default theme in your theme package.

Things to understand of fallback of magento theme

You should have RWD in "Default" section of system > configuration > design > theme. This will make sure your theme will fallback to this theme.

Points to remember

  1. When there is no required .phtml file exist in RWD theme, then it will again fall back to base theme.
  2. Not all .phtml files exist in RWD theme, some of them extend from base theme.
  3. Same thing for css or js or image files.

Hope this helps you.

More reading:

  1. http://alanstorm.com/magento_infinite_fallback_theme_xml
  2. http://www.classyllama.com/blog/depth-look-magento-theme-fallback

Why there is no style applied?

When it is falling back to base it tries to find those styles, since they don't exist there, it is unable to style your html. It totally make sense. Right click on browser and do inspect element, you will see those css/js/image files thrown as 404 not found error.

  • I started from scratch, installed compass and sass, followed the guide perfectly and now im just getting an unstyled page. The guide doesn't tell you to copy of any of the CSS files from the rwd folder so I have no idea where I am going wrong here – Oli Tuck Feb 25 '16 at 0:40
  • Are you saying that I should be copying the CSS and JS aswell? – Oli Tuck Feb 25 '16 at 0:46
  • If you want to edit those files, then yes, otherwise no need to. Since it gonna fall back to RWD css/js anyway. – Adarsh Khatri Feb 25 '16 at 0:47
  • but it hasn't, when i dont copy the css and js over, it just shows as a unstyled page with just text – Oli Tuck Feb 25 '16 at 0:47
0

From the comments, I gather your theme fallback xml is not correct.

The file should contain proper xml, with a <parent> directive.

<?xml version="1.0"?> 
   <theme> 
     <parent>rwd/default</parent>
   </theme>

It looks like the resource you are working from has some issues with the display of the formatted xmlon their blog entry

This is most likely why you thought you only need to have the text 'rwd/default' in the theme.xml file, without any directives.

enter image description here

  • but in the end i did that before you ever even replied, not saying your wrong but my xml file is exactly like that now and still didnt fix it until i changed the settings in the magento config – Oli Tuck Feb 25 '16 at 13:35
  • Look i am not getting into a competition on who is right and who is wrong. Good luck with your site. – ProxiBlue Feb 25 '16 at 22:11
  • However, the fact that editing your theme settings as was suggested made it work most likely points to some other issue. Months from now you will most likely run into some other issues with theme files. Due to the incorrect setup youd most likely never figure out why. It is best you revert that. And figure out what is really wrong. – ProxiBlue Feb 25 '16 at 22:21
  • I wasn't arguing, was just saying that I edited the xml file as you stated and nothing changed until I changed the settings in magento. Infact I would love to know why my theme.xml file isn't making the changes I need as I would rather do things the correct way – Oli Tuck Feb 26 '16 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.