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
SSL Auto-Update not working + question about updating threads
Avatar
Ryan
Member
sp_UserOfflineSmall Offline
Apr 27, 2015 - 9:40 am

Hi,

I've got both a question and a problem.

1) SSL auto update isn't working.
 Basically, the plugins like subscription manager, watches manager... etc are all making XMLHttpRequests to an secure location (http) when the forum is running on https.

Old versions of chrome, android browers (pre 5.0) and Safari allow this but IE11+, Firefox 28+ and Chrome 40+ do not allow inscure xmlhttprequests.

I'd appreciate it if I could get this fixed :/

2) Forcefully updating all threads to replace certain links
I essentially want to somehow search for all "https://simple-press.com" links and replace them with "https://simple-press.com" to bulk update all images hosted on my websites forum so that they are being delivered by https.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 27, 2015 - 10:56 am

All urls constructed for XMLHttpRequest use are derived from core WordPress functions that provide the scheme in use as it knows it. If this is not happening then something is missing in the WP configuration.

The only things we know of that may not automatically covert over to https when the website does is firstly any urls embedded in old posts when the site was http. And - calls to gravatar.com - the latter of which is currently under investigation for changing as appropriate.

As to trawling through your records and changing old urls then you really have two options. Assuming we are simply talking about forum topic/post content here then it would be possible to create a simple Wp style filter that would change each http top https prior to display. This is simple to do, has a small performance hot of course and does not actually change any data.

The only sensible alternative would be to export your forum post data to a SQL dump file. Use a decent text editor to perform a search and replace and then import it back into the database. That makes a permanent change nut you just have to ensure your forum is in maintenance mode for the duration. This kind of operation could be done in under 5 minutes if you are all prepared and ready to go.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ryan
Member
sp_UserOfflineSmall Offline
Apr 27, 2015 - 12:18 pm

Hi,

I can't see what could be wrong, wordpress is currently setup to https so I'm not sure why it's not working... could you clarify what needs to be set in order to make https work?

I thought of the SQL method but was hoping there was an easier and faster way.

Cheers

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 27, 2015 - 10:09 pm

as to admin, we basically, we get the schema (http or https) from wp...  we use their functions...

I assume you do:  https://codex.wordpress.org/Ad.....n_Over_SSL

and set the wp config options as wp details?

if this is front end, on wp - settings - general, are the blog and wp urls defined with https in them?  and then if on forum - integration - page and permalink, does the forum url have https in it? 

I dont know of any way to change urls that exist in the db from http to https short of changing via mysql db queries...

Avatar
Ryan
Member
sp_UserOfflineSmall Offline
May 7, 2015 - 10:44 pm

Hi Mr Papa,

Yes, WP-Config has the appropriate details and so does Wordpress via the SQL/General section of Wordpress.

The problems still exist, I've even got my host to try and do the forcing https via apache init.d scripts and the same exact problem exists.

I've just tried on a 100% updated version of wordpress & plugins and the same thing again 🙁

Would it be possible for one of you guys to take a look? either via Teamviewer (or similar program, would help me see the problem too!) or I can give FTP and Wordpress access.

Cheers

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 8, 2015 - 12:39 am

several things are confusing here... its been about 3 months since I last ran through a complete ssl test (got new computer and now dont have ssl configured again) but all worked... unfortunately, its always been a royal pain to get working locally... but perhaps a task for this weekend...

and we have many users using ssl not reporting any issue... 

not saying you arent having a problem or something might not be afoot, but kind of hard to pinpoint when affecting single user...

is the only thing not working the auto update stuff?  leave aside urls in post content - we cannot really do much about that - nor should we attempt to alter a user's content...  but want to make sure the only thing you see a problem with ssl is the auto update - allows us to focus a bit more narrowly...

and btw, FF 28 is ancient so this wouldnt be something new and just cropping up...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 8, 2015 - 1:49 am

ah, thinking a bit more about auto update...  did this site use to be non https before?  if so, that might explain it...

the auto update ajax (XMLHttpRequest) urls are stored in the database... so if you were running non https before, they might still have simple http urls instead of https...

can you look in your database?  look at the sfmeta table...  for any row with a meta type of autoupdate... are the ajax update ulrs (in the meta value column) there using http?  if so, should be able to update the db and getting it  working...  be careful, those are serialized arrays so you cannot just change the string, you also have to change the string length... if you dont know how to do that, post the values here and we can help...

would  also explain why my ssl tests wouldnt find it.. would have been ssl since day one - not changed...

Avatar
Ryan
Member
sp_UserOfflineSmall Offline
May 8, 2015 - 2:35 am

Hi Papa,

Yes previously it was running http not https, and you're right in the sfmeta table under the meta_type of "autoupdate" the value is:

a:2:{i:0;s:13:"spjUserUpdate";i:1;s:58:"http://www.website.com/index.php?sp_ahah=autoupdate";}

It's found in 4 different autoupdate variabless, do I only need to change these 4 or are there more in other tables?

EDIT: 
Here are the exact strings: (changed website name, but it's still same amount of characters)

a:2:{i:0;s:16:"spjwatchesupdate";i:1;s:81:"http://www.abcdefabcdefab.com/index.php?sp_ahah=watches-manage&target=watches";}

a:2:{i:0;s:13:"spjsubsupdate";i:1;s:75:"http://www.abcdefabcdefab.com/index.php?sp_ahah=subs-manage&target=subs";}

a:2:{i:0;s:11:"spjpmupdate";i:1;s:74:"http://www.abcdefabcdefab.com/index.php?sp_ahah=pm-manage&target=inbox";}

a:2:{i:0;s:13:"spjUserUpdate";i:1;s:58:"http://www.abcdefabcdefab.com/index.php?sp_ahah=autoupdate";}

I'd appreciate some help (not sure what you mean with serialized) :S

Why is the forum software stripping out my code tags... it looks right then I press submit/save and it removes it!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 8, 2015 - 2:53 am

To get things corrected as far as AutoUpdate goes then you could edit these database entries directly if you feel able. The problem is that these are held in what php calls a serialised array. So there are two edits to be made for each one in the sfmeta table.

If you look at that row entry above, just before the url there is the number 58. This has to be set to the number of characters in the following text string. I know you have replaced the real url here because the text in your post is only 50 characters long You will find the real one in your database is 58.

So - quite simply - if you change that to https then you will need to change that value to 59. Failure to do so will cause errors. This is why complex edits on serialised array data is fraught with danger. But this one is not complex.

So yes - you only change those 4 sfmeta entries.

As to the other 4 then it really depends on where they are. As Steve pointed out above, if they are in the post content then should they be changed? It is really up to you.

Meanwhile we will have a conversation here about this as we do need to try and avoid this happening (the sfmeta table) in the future of course.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ryan
Member
sp_UserOfflineSmall Offline
May 8, 2015 - 3:22 am

Yellow Swordfish said
To get things corrected as far as AutoUpdate goes then you could edit these database entries directly if you feel able. The problem is that these are held in what php calls a serialised array. So there are two edits to be made for each one in the sfmeta table.

If you look at that row entry above, just before the url there is the number 58. This has to be set to the number of characters in the following text string. I know you have replaced the real url here because the text in your post is only 50 characters long You will find the real one in your database is 58.

So - quite simply - if you change that to https then you will need to change that value to 59. Failure to do so will cause errors. This is why complex edits on serialised array data is fraught with danger. But this one is not complex.

So yes - you only change those 4 sfmeta entries.

As to the other 4 then it really depends on where they are. As Steve pointed out above, if they are in the post content then should they be changed? It is really up to you.

Meanwhile we will have a conversation here about this as we do need to try and avoid this happening (the sfmeta table) in the future of course.

Hi,

Ok, I've solved that issue and the auto-update is working now 😀

Now for the second problem where I can't link any external images, the actual sql source of the post with the image shows a correct:

<img alt="" src="http://www.somewebsite.com/wp-content/uploads/picture.jpg" width="250" height="400" />

If I disable https on my site then the link works, now if I switch https on... it shows:

 because it's somehow trying to load it as https (the site in question doesn't have ssl certificate)

If I inspect element it shows:
<img src="//www.somewebsite.com/wp-content/uploads/picture.jpg" width="250" class="sfimagebaseline" alt="">

It's turning them into cdn style links... // before the www???

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: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620