Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Upload addon and "Click To Enlarge"
Avatar
Tim Peterson
Member
Free Members
sp_UserOfflineSmall Offline
Mar 20, 2013 - 5:03 pm

Thanks for the help.

 

I've found this portion of the mentioned function:

if ($anchor) {
if($width[1] ? $w = $width[1] : $w = 'auto');
if($height[1] ? $h = $height[1] : $h = 'auto');
# Use popup or not?
if ($sfimage['enlarge'] == true) {
$out = '<a href="javascript:void(null)" class="vtip" title="'.sp_text('Click image to enlarge').'" onclick="spjPopupImage(\''.$src[1].'\', \''.$w.'\', \''.$h.'\', \''.$sfimage['constrain'].'\');" >';
$out = apply_filters('sph_display_image_popup', $out, $src[1]);
} else {
$out = '<a href="'.$src[1].'" '.$thistitle.'>';
}
}

This is the HTML its rendering:

onclick="spjPopupImage('http://www.weedwackers.org/ww/wp-content/sp-resources/forum-image-uploads/weedwack/2013/03/IMG_3627.JPG" title="Click image to enlarge" href="javascript:void(null)">

 

I notice the closing paren for the spjPopupImage function is missing in the HTML... My knowledge of PHP only goes so far. Do you see any issues with the function? improper escape characters? Something I'm missing?

 

On a side note, I've upgraded the simple press plugin to the most recent version to see if that helped... to no avail.

Avatar
Tim Peterson
Member
Free Members
sp_UserOfflineSmall Offline
Mar 20, 2013 - 5:17 pm

Actually, Here is the full section of that html output. 

 

<a class="vtip" '1');"="" '768',="" '1024',="" ,="" onclick="spjPopupImage('http://www.weedwackers.org/ww/wp-content/sp-resources/forum-image-uploads/weedwack/2013/03/IMG_3627.JPG" title="Click image to enlarge" href="javascript:void(null)">
<img class="sfimageleft" width="100" alt="IMG_3627.JPG" src="http://www.weedwackers.org/ww/wp-content/sp-resources/forum-image-uploads/weedwack/2013/03/IMG_3627.JPG">
<img class="sfimageleft sfmouseleft" alt="" src="http://www.weedwackers.org/ww/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png">
</a>
 
looks a little off in the first part after the class call out.
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 20, 2013 - 5:17 pm

Yes - that's the code I was pointing you to. And yes - as I said - the closing quotes are double not single. That code is not doing that. if you look at the escaping you can see that.
And that is why i was asking about other WP plugins that might be running filters on post content as this sort of thing can occur with a badly behaved filter

andy-signature.png
YELLOW
SWORDFISH
Avatar
Tim Peterson
Member
Free Members
sp_UserOfflineSmall Offline
Mar 20, 2013 - 5:31 pm

Well I'm stumped. 

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 21, 2013 - 4:56 am

That makes two of us!

I trawled through these forums looking for any evidence of a prior issue but found none and I don't remember one. I remain suspicious of some errant text formatter or filter somewhere but those other plugins you have there look innocuous enough. I will try and find time this morning to download them and try them out locally.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Tim Peterson
Member
Free Members
sp_UserOfflineSmall Offline
Mar 21, 2013 - 5:25 pm

 

Many thanks.... any help you can provide is appreciated.

Tim

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Mar 21, 2013 - 11:07 pm

It does look like you WP theme ads some image handling code too. It might be worth a try and switch to another theme just for a quick test. You may have to upload a new image to a post after switching just to be sure.

Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Aug 29, 2014 - 4:12 pm

I have the same symptom (thumb won't enlarge - mismatched quotes around image).  I've been using simplepress for several years and this problem didn't arise till upgrading to the latest version.

So you can see in this forum post where the images BEFORE the upgrade will enlarge, but the images posted AFTER the upgrade won't. http://www.byobwebsite.com/for.....up/#p25512

For the short term I have changed the size of the thumbnail images so my users can still make use of the images.

Now - the theme didn't change but my hosting did.  I moved to WPEngine immediately prior to upgrading.  

I have deactivated all plugins that appear to me to use or require jQuery with no change in behavior.  Given the mismatch in quotes I don't see this as a jQuery issue anyway.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Aug 29, 2014 - 5:08 pm

Could it be anything to do with 'viewscreencasts' ?

Viewing the page I get 'TypeError: a is not a function: recorder:17'

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 29, 2014 - 5:19 pm

No - I doubt it is a jQuery issue. Although I would point out that if you open the web console on that page you will find a raft of script errors - mainly coming from something called 'jquery-postmessage-plugin'. After those I am a little surprised much works at all to be honest!

Well - as you saw with the first user the thread sort of fizzled and this occurrence now becomes the second such one to have this issue. One difference that I see though is that clearly on the threadx you linked to there are images that work and those that do not. This suggest strongly that the problem is with the saving of the post into the database as opposed to the content display as the display applies the same logic to all of the images.

So on the 19th of August it was fine and by the 27th it was broken.... That's a small and recent window. Obvious question has to be what might have changed? Upgrading to SP 5.5.0.1 can't be the culprit as that was a very small change for a security issue - plus this is the only instance of such a problem. I don't really see that moving to WP Engine an be an issue either. They are not likely to be negatively effecting database saves.

So - anything else over those few, short days?

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: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625