My .info file is prosperpro.info, but my theme's folder is named prosperpro8. I had not realized this difference because the code was working. When I realized this, and tried to changed the .info file back to prosperpro8.info, the code would no longer work.
I thought that the .info file required to have the same name of the theme's folder.
Am I wrong? If they must have the same names, how can I correct it? (Changing the file name will result in code break.)
You cant give same name for theme and module. I have found an article on drupal.org
How to Resolve module-theme name collision
When developing a site it can happen that a module and theme are being given the same name. This results in very weird behavior: overriding hooks can make your blocks disappear, print $content returns only 'array', hence disappearing admin interfaces which force us to alter the database to get back on track.
Now we have to find out how to remove the new theme and switch back to an old one. if your site is big, with lots of content, then reinstalling is not an option. I tested this with MySQL, so these hints are for MySQL only.
Make a backup of your database first. We are going to edit the dumped records, and reinsert the database. I used this method because using my favorite editor is way easier and safer than using MySQL shell (anyway we shouldn't edit a live site database).
The theme name is registered in the following tables in your database: system, variables and block. Clear the cache manually, meaning to remove all the INSERT INTO
cache_lines in order to see results. Change the 'default_theme' value in
system. Note that 's' stands for string length, so be sure you put the string length after the 's:'. Also make sure you change the value to an existing theme (available themes are listed in
system). And remove, or rename your troublesome theme.
The change in
blockis imperative, otherwise the blocks will not appear. Drop your old database from the sql server and insert the edited one. Voila, we have recovered from a theme crash.
Never give a module and a theme the same name
Here's the D7 Patch
Here is the manual page for creating info files. - Structure of the.info file Those are the requirements for the .info file.