A leftover D6 block.tpl.php in Garland breaks upgrade to D7. Deleting the file after upgrade doesn't resolve the problem.
I think the problem is mainly caused by an incorrect update procedure, but one likely to be followed by many (novice) Drupal users: just copy the new D7 files over the existing D6 files instead of first deleting the old ones.
Steps I took to reproduce:
- I did a clean install of D6.19 with NL locale (distrib from http://drupal.be/download )
- Added two pages
- Installed D7-dev copying the files over the existing installation
- Called update.php
- After upgrade trying to login give the errors (2 times): Notice: Undefined property: stdClass::$content in include() (line 10 of /Users/george/Sites/upgradetest/themes/garland/block.tpl.php).
- After deleting the leftover D6 block.tpl.php every page displays the error (repeated several times): Warning: include(/Users/george/Sites/upgradetest/themes/garland/block.tpl.php): failed to open stream: No such file or directory in theme_render_template() (line 1234 of /Users/george/Sites/upgradetest/includes/theme.inc).
- Now I can't login via /user or call /admin because of the theme errors
Comments
Comment #1
mo6Adding tags
Comment #2
alan d. commentedThis use to work for Drupal 6 issues like this:
1) Edit the settings.php to allow non-admin users to run update.php
2) Run update.php
3) Reset the access variable in the settings.php file.
I hope that this helps to reset the site for anyone experiencing this issue.
An alternative is to copy the systems block template file into the Garland directory - at least then you will be able to log in and use the site.
Comment #3
marcingy commentedTo quote UPGRADE.TXT
Remove all old core files and directories, except for the 'sites' directory and any custom files you added elsewhere. In otherwords the d6 version of Garland should have been deleted.
Comment #4
mrgoltra commentedI was experiencing this and this is how I resolved it.
via phpmyadmin, I deleted all the block entries, all of the themes listed there were version 6 themes.
Comment #5
gaking44 commentedI changed the administration interface theme to Garland and now I can't access the admin to change the theme to something else. Is there a way to correct this by changing the theme outside of the admin interface?
THIS IS THE ERROR MESSAGE I GET:
Notice: Undefined property: stdClass::$content in include() (line 10 of /home/content/19/7360719/html/themes/garland/block.tpl.php).
I tried changing the setting.php file, but that didn't work. Anyone figure out how to fix this problem?
Comment #6
alan d. commentedCopy and paste the file "modules/block/block.tpl.php" over the file "themes/garland/block.tpl.php".
Comment #7
gaking44 commentedAwesome!! I have been trying to fix this for 2 days now and that little fix did it. Thank you oh so much!!
Comment #8
alan d. commentedYup. Sadly, running update.php no longer flushes the caches unless there are pending updates.
Comment #9
frank ralf commentedMany thanks for #6 - that did the trick!
Comment #10
mmtahir commentedofcourse #6 did the trick and saved my work of years
Comment #11
droshani commentedI have the same issue, I have upgraded from D6.26 to D7.14 and the same thing happened, I did #6 but it did not help, Is #4 helping at all.
If #4, how do you remove any possible entities for Theme 6,
Comment #12
alan d. commented@droshani
Look for all versions of block****.tpl.php from the active theme and remove these. Run the update.php using the steps from #2 (there is some partial cache clearing now) and you should be right to go.
Comment #13
droshani commentedWe I have done that as a mater of fact I can login as admin and do normal activities but my site look like this
http://kurdistanica.com/
I removed all ref to D6 module from Block table in the DB
But still the main content is in footer and a shadow main link is at the top
Comment #14
alan d. commentedThe blocks are all there: header, sidebar-first, content, footer. They just need some work with the theming.
Try the forums if you need help with theming or css.