Notice: Undefined variable: user_links in include() (line 15 of /hermes/bosweb/web057/b570/....../public_html/........./sites/all/themes/UrbanSolice/templates/page.tpl.php).

Similar message displays for all the themes with drupal 7. Is there a bug in Drupal 7?

Visit http://indiagps.in (to see the error message)

Kindly guide.

Thanks.

Arvind

Comments

sojusnik’s picture

Same here.

Please update the theme with this patch¹ and the error message should vanish.

¹ http://drupal.org/node/1165790#comment-4522090

FatherShawn’s picture

Status: Active » Closed (duplicate)

Noticed that this issue is assigned, so moving discussion here...

FatherShawn’s picture

Status: Closed (duplicate) » Needs review

I think the problem is the name of the .info file. According to http://drupal.org/node/171194 the machine name of the theme is derived from the name of the .info file. Scanning the theme files, the only place that urban_solace appears is in this file name. All other occurrences including the project url are without the underscore. Changing this file name to urbansolice.info and clearing the cache also removes the error.

dotman’s picture

well changing the .info filename made things a lot worse for me. will have to reinstall and try applying the patch.

dot.

FatherShawn’s picture

You may need to clear the theme cache after changing the .info name to urbansolice.info - it's working without a hitch for me and that's the only change I've made.

mjross’s picture

Assigned: arvind5lib » Unassigned
Status: Needs review » Active

With fresh installations of D7 and Urban Solice, I'm seeing the exact same problems. Renaming the file urban_solice.info to urbansolice.info (or UrbanSolice.info), and then clearing all the caches, completely breaks the theme (as dotman mentioned in #4).

Leaving the .info file unchanged, but deleting line 15 of page.tpl.php, solves the problem. That line contains $user_links, a variable that is not defined in the code above it.

mrwood’s picture

I too received the same error message. I was able to resolve by:

1. Change the default theme to something other than urban_solice.

2. Rename the .info file to urbansolice.info This matches the name defined in the .info file.

3. Rename the directory the theme lives in to urbansolice

After I changed the default theme back to urbansolice the problem was resolved. Note that name of the theme in the info file, the file name of the .info file and the directory it's in must be the same.

BTW, $user_links is defined in a preprocess function which is located in the template.php file.

effiejayx’s picture

worked like a charm...

usaginyunyu’s picture

Thanks!!
This also worked for me ^^

cdykstra’s picture

#7 worked on my Drupal 7.21 installation today. Thanks!