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
Activating theme triggers fatal error - and other errors
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 17, 2013 - 5:15 am

While trying to troubleshoot an issue with the thumbnails on our forum I've run into an error message when switching themes.

The actual issue I m trying to fix is in conjunction with limiting image sizes to 400px width on our forum. That in itself works fine. But when I click an image and it opens in lightbox it is still set to 400px. See screeshot:

Capture.PNGImage Enlarger

Now, I am using a, slightly, modified default theme, just to add extra social identities. I already looked at the other thread where someone had an issue with blurry images. Perhaps I need to update my custom theme. So I simply switched to the default theme. And that's where the next problem triggered:

atal error: Cannot redeclare spdefault_textdomain() in /problem-with-post-edit-buttonome/decor8sh/public_html/ecourses/wp-content/sp-resources/forum-themes/default/templates/spFunctions.php on line 30

I've gone through all the usual troubleshooting so deactivated all plugins except for s2member, can't shut that one off as our site is paid access only. I also switched to the Twenty Thirteen default theme because our theme uses its own ligthtbox. I did all of that at once but the issues remained. I purged browser cache (Firefox) and I also purged my Cloudfront cache to make sure nothing was cached.

Next I tried deleting the default theme. And that's when I ran into yet another issue - deleting themes doesn't work. The theme remains. So I FTPd in, removed the theme, went back to S:P, uploaded the default theme again as a zip. All worked fine, activated - got the error message above again - loaded a topic with a resized image and still got the one above in the screenshot.

One more note concerning image size: if I preview a post and click the image it opens just fine as a full size image. But once I publish the post it only opens as 400px.

Sorry to cram all this in to one topic but since this is the order of events that occurred I figured perhaps it's all related.

Thorsten

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 17, 2013 - 5:51 am

Let's try taking these one at a time and let's start with the theme activation error. Your problem here is that you missed a step when creating your custom theme. Please see this codex article and then see step 5 in that article regarding the need to change the name of the localisation text domain. That will resolve the error message you are getting although - this should only show up when activating. It should be fine in use after that.

The actual issue I m trying to fix is in conjunction with limiting image sizes to 400px width on our forum. That in itself works fine. But when I click an image and it opens in lightbox it is still set to 400px.

I have to say I am not really sure quite what you mean here. If you are restricting images (and I assume you mean uploaded images) to a width of 400px then when using the popup enlargement it IS going to be shown at 400px. And any attempt to make that bigger is going to blur it horribly.

I assume I am missing something so could you explain further on this one point? And perhaps a link to an example on your forum (if guests can see it) and some more deatils of your image settings in SP...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 17, 2013 - 5:54 am

Progress: I recreated my custom theme and ensured I changed spDefault to spMyTheme in spFunctions.php, that solved the error message. One down, two more to go.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 17, 2013 - 6:03 am

Did you see my post above - or were we posting at the same time!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 17, 2013 - 7:02 am

Indeed we posted at the same time.

To the image issue, I am uploading and/or linking to full size images. Here's what I am doing: under Forum > Options > Content Settings > Image Enlargement I set 'Use popup image enlargement' and then I set 'Thumbnail width of images in posts (Minimum 100px):' to 400. So any image I post >400px will be resized to 400px and a little magnifier is added. If I click on that image it pops up larger but is still 400px and not the original size.

If I preview my post and click the image it pops up original size. After publishing the popup is always 400px.

I made sure now I'm using the latest copy of the default theme, then edited it slightly to create my own custom theme (I'm just changing breadcrumbs to flat view and adding Pinterest and Instagram social links).

What I noticed, and you can see that in the screenshot, is that a "?=400" is added at pop up. I don't notice this here on the forum. Apparently the 400px scaled size is passed instead of using the original size (or no size attribute at all).

Note: I don't use S:P's image uploading option, I only post images that have been uploaded to WP's media library or external images from Flickr and such.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 18, 2013 - 4:00 am

I suspect that you haver another plugin installed that is performing a lightbox type effect and that this is messing with and taking over the display from the Simple:Press native popup. Is that a possibility -= and of so - could you deactivate it as a test...?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 18, 2013 - 4:05 am

I had already deactivated all other plugins and switched to the default theme, cleared browser cache and Cloudflare cache. The issue persisted.

As mentioned when previewing a post the popup works fine, it shows the full size image. But once published it keeps puling the S:P resized version.

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 18, 2013 - 4:10 am

Hold on, I am trying it again and now it's working. Looks like there is a conflict with Jetpack (it's the only one I didn't deactivate previously)...

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Nov 18, 2013 - 4:12 am

Yup, it's definitely Jetpack.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 18, 2013 - 4:17 am

Mmm. It is something all the same. This "?=400" is not something we add - in fact we do not use any query variables for the image popup. So - something you are using there is scraping the post content and finding the image url and taking the current output as the dimensions whereas we show the thumbnail and load the main image on demand.

You can see this if you look at the html source being generated for this very page with your image at the top in post #1. It would probably be useful to compare this to the html source being generated for your own site. Can you do this?

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
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