I got a bunch of notices when installing the latest D7 checkout:
Notice: Undefined index: name in block_menu() (line 147 of /var/www/marcvangend/modules/block/block.module).
Notice: Undefined index: name in block_menu() (line 166 of /var/www/marcvangend/modules/block/block.module).
Notice: Undefined index: name in system_menu() (line 622 of /var/www/marcvangend/modules/system/system.module).
Notice: Undefined index: name in block_menu() (line 147 of /var/www/marcvangend/modules/block/block.module).
Notice: Undefined index: name in block_menu() (line 166 of /var/www/marcvangend/modules/block/block.module).
Notice: Undefined index: name in system_menu() (line 622 of /var/www/marcvangend/modules/system/system.module).
Looking into it now. Since it's a notice, it can't be critical, but it's still a huge problem (at least for UX/DX) to get warnings like these even before the installer is completely finished.
Comments
Comment #1
marcvangendOK, found it. This was caused by an empty .info file in sites/all/themes/[themename]/[themename].info. My mistake - the file shouldn't have been there.
Comment #2
orlandomenke commentedI'm sorry. I don't get it.
I'm fairly new to drupal 7, just installed it, but get the same notice.
As I recall I need to have an .info file inside my theme folder. But unlike the above mine isn't empty.
I see marcvangend saying that he shoudn't have a .info file inside his theme?!
Should I read the documentation better? Cause I do not get this fix.
Hoop to see a response soon.
Comment #3
marcvangendIn my case, there wasn't a theme at all, just an empty [themename].info file in an otherwise empty [themename] folder. Of course a proper theme should have a proper info file.
I'm not sure what's causing your problem... what did you install besides drupal core?
Comment #4
thekar commentedNo Solution Yet?
Just tried to install 7.0 and same Problem and i dont find any themename.info file anywhere ...
Comment #5
marcvangendthekar, it's really hard to help when you just say "same problem". Please tell us about your site (fresh installation, upgraded from D6? which modules?) and environment (OS, webserver, PHP version, DB) and everything else that may be relevant. Also include the exact error message.
Comment #7
digilu commentedMy issue/resolution sounds similar. I created a sub-theme using omega. Somewhere in that process a sub theme folder was create that had a blank .info file. When I tried to enable another theme I couldn't get access to correct blocks. In fact, it didn't matter what themes I enable or disabled.
The solution was to delete the entire sub-folder that was created, clear cache, and everything started working correctly.
Comment #8
donkeyhot commentedMay be this will help someone.
Faced the same problem, when created subtheme based on Framework-theme (where attribute "name" is in first string of template.info).
Problem was solved by converting from UTF-encoding to UTF without BOM.
Comment #9
Charles wang commentedAs donkeyhot said, when you use some edit tools such as UltraEdit to modify the .info file, this file will be saved with BOM, and this is of course one of causes. Thus, when you use those tools, you should confirm that it is saved without BOM.
Thanks to donkeyhot .
Comment #10
perception30 commentedhelp!
The error code were generated after enabling the Forum module in Drupal openpublish.
and removing menu called sub-nmenu.
Notice: Undefined property: stdClass::$forum_tid in forum_node_view() (line 271 of /home/content/01/8444401/html/drupal/modules/forum/forum.module).
Notice: Undefined index: menu-sub-menu in menu_block_view() (line 469 of /home/content/01/8444401/html/drupal/modules/menu/menu.module).
Comment #11
perception30 commentedThis will temporary fix the problem,
ini_set('error_reporting', 'E_ALL ^ E_NOTICE');
If I get a permanent solution, I shall post on this site.
Comment #12
morimori commentedNot sure if this is the correct way, but the following solved it for me (in addition to some content types not showing up in "add content"). In block.module and system.module, change all instances of
'title' => $theme->info['name']to
'title' => $theme->name(the lines shown in your error message)
Comment #13
timodwhit commentedI had a similar problem and in one of the sub-folders there was another .info file. I was using gridless as a base, so just change it to .info.off and that should take of your problem
Comment #14
david_p commentedI have the same issue, and followed the suggestions above but couldn't fix it. I didn't find any stranded .info file either. I'm using Drupal 7.15 and a custome-made theme based on the Skeleton boilerplate (created by someone else). These are the error messages I got:
Right now I cannot access content types or the Configuration section. This happened a couple of hours after I updated the Calendar and Date modules, so I'm at my wits' end.
I'd appreciate any help.
Comment #15
hscz89 commentedI fixed this problim simply going to configuration>system>cron
and Run Cron.
don't know whats the relation between this and the bug but it worked fine
Comment #18
Aurochs commentedThanks for the fix! great! changed encoding and it got all right!
Comment #19
ashishshah044@gmail.com commentedhttps://www.drupal.org/files/issues/drupal-undefined-theme-name-in-info-...
add in theme.inc and then clear cache it may solve.