Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Error message when switching themes
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2011 - 8:11 pm

When switching between my theme and the default in the Admin dashboard I get the following message:

Fatal error: Cannot redeclare spdefault_textdomain() (previously declared in /problem-with-post-edit-buttonome/gruzcom1/public_html/ABF_Test/wp-content/sp-resources/forum-themes/cTheme/templates/spFunctions.php:18) in /problem-with-post-edit-buttonome/gruzcom1/public_html/ABF_Test/wp-content/sp-resources/forum-themes/default/templates/spFunctions.php on line 19

Despite this error the switch seems to be successful, I have checked the sPFunctions.php file and it looks the same as the one in the default theme, any ideas what this might be?

Conrad

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2011 - 8:19 pm

Definitely the same in both spFuntions.php files, looks as though it is whatever declares the default font, none critical but you don't want to see any message that says fatal error!

 

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 10, 2011 - 4:50 am

It's harmless but was also fixed up several days ago? Have you not updated your theme folder from svn recently?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 10, 2011 - 6:37 pm

I always do all 3 categories when I svn up. However I am using my theme and the error came when I switched from my theme to the default theme. I had better spend a few days doing some file comparing.

Avatar
Lee H
Coastal New England (USA)
Member
Free Members
sp_UserOfflineSmall Offline
Aug 10, 2011 - 7:14 pm

@Conrad

It might be that "plugin" for the time format we were messing with? Also, in case you haven't noticed Andy made that change making time and date stackable so that plugin is redundant now anyway.

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2011 - 3:00 am

I have replaced the all the template files from my theme with the contents of the recently updated default theme. I still see the error, any idea where else I should look Andy?

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 11, 2011 - 4:09 am

It is simply the name of the function setting the localisation in the theme spFunctions.php file. If you copied it from one iof ours then it will have the same function name. For that brief period when you switch themes, both are loaded causing the duplicate function name warning. Not sure there is anything we can do about this other than to recommend people use a unique function name for that call - preferably including the theme name in the function name as we have done.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2011 - 4:46 am

So where are the locations where I need to rename it? Is it only called at load up from the spFunctions.php file?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 11, 2011 - 6:28 am

It is this code:

add_action('init', 'spDefault_textdomain');

# load the theme textdomain for tranlations
function spDefault_textdomain() {
    sp_theme_localisation('spDefault');
}

This is from the spDefault theme. The name is in the add_action and then is the name of the function. They both need changing and as I say, we would recommend changing them to match the theme name chosen.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 5, 2011 - 6:26 pm

I never did sort this out can you be really specific and tell me exactly what to do? My theme has been named Riverbed 1.0, I think that I have done this correctly as this is how it appears in the available Themes panel. It also works fine I just get the message when switching. Yes I did copy your default theme initially and the 2 spFunctions files are identical. Where and what exactly should I rename?

Sorry I'm feeling particularly dense this week I've been running simulations of antennas for weeks at work and my brain is totally fried!

Conrad

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626