Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Undefined index error on iPads/Tablets
Avatar
Ryan
Member
sp_UserOfflineSmall Offline
Apr 8, 2015 - 2:40 pm

Hi Guys,

Users on iPads are getting the following error appear on my website:

Notice: Undefined index: active in /problem-with-post-edit-buttonome/WEBSITE/public_html/wp-content/plugins/simple-press/sp-startup/site/sp-site-support-functions.php on line 484

The function that is throwing the error is:

function sp_get_current_sp_theme() {
 global $spDevice;

 if ($spDevice == 'mobile') {
 $theme = sp_get_option('sp_mobile_theme');
 if (!empty($theme) && $theme['active']) return $theme;
 }

 if ($spDevice == 'tablet') {
 $theme = sp_get_option('sp_tablet_theme');
 if (!empty($theme) && $theme['active']) return $theme;
 }

 return sp_get_option('sp_current_theme');
}

The actual line is two lines under the tablet if statement:

if (!empty($theme) && $theme['active']) return $theme;

My tablet theme support is empty so I don't know why it's going wrong see: 

2015-04-08 - 19.38.59 ~ capture

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 8, 2015 - 2:51 pm

Well it might be worth going into the mobile and tablet theme pages and at least setting them to the desktop theme which will result in stopping the notice being shown. Clearly - for some reason - the defaults have not saved on your DB.

But.... there is no way that you should allow Notices of this kind to be shown to your users on a production site. It just isn't done. It means that error handling in your php.ini file on your server is not set up correctly for a live site and should be corrected as soon as you can. And that may, I assume, mean a strong word sent to your web host.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ryan
Member
sp_UserOfflineSmall Offline
Apr 8, 2015 - 6:23 pm

Hi Yellow Swordfish,

I had set wp-config.php's WP_DEBUG variable to true to see the error, they don't normally see the error I made it appear for reporting purposes.

Thanks for the advise, I've set the the same as the main site.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 8, 2015 - 6:31 pm

That's good news. I am glad it is not reporting all those annoying notices to your users.

andy-signature.png
YELLOW
SWORDFISH
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