Hi everyone, i have this problem and i think yo everyone who want to create a the new theme based in bartik theme will have the same error

( ! ) Fatal error: Cannot redeclare bartik_preprocess_html() (previously declared in C:\wamp\www\dptest712\themes\bartik\template.php:6) in C:\wamp\www\dptest712\sites\all\themes\dptest712\template.php on line 27

I copy the theme bartik and page in site/all/themes/bartik2

name = Bartik Sub-Theme
description = A sub-theme of Bartik.
package = Core
version = 1.0
core = 7.x
engine = phptemplate

base theme = bartik

---------Solution that i found

edith the "template.php" in your new theme, just find and reemplace the function bartik_preprocess_html, for function bartik2_preprocess_html and it will works

!!!!! But this is not the Right solution, in drupals under the version 7.10 dont have this problem, soo can drupal developers tell us a right solution????

Comments

lekofev’s picture

Can i will Update for new drupal core release with this edition?? i dont know....

lekofev’s picture

yep.... you can use this edition with the new drupal core 7.14 : D

nevets’s picture

Actually that is the correct solution, sub-theme functions should start with the name of the sub-theme (not the parent theme). Note it should have been a problem in 7.11 also

jutior01’s picture

This is my first comment in drupal. I am a new user for Drupal and trying to learn something that I can actually use for my current project for my new customer. I have the same problem and now it is gone.
Thanks. It is actually the Name that was the same name.
:)

jasom’s picture

change function bartik_preprocess_html to function YOURTHEMENAME_preprocess_html. For example my theme name is uni (Universal) so I will have function uni_preprocess_html