R11 Canonical link not updated when Storewide SSL enabled

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

R11 Canonical link not updated when Storewide SSL enabled

Post by AbleMods » Fri Feb 19, 2016 3:57 am

I've doing quite a bit of work with Facebook Open Graph tags recently and have discovered something.

When the store is configured for storewide SSL, the PageHelper.BindMetaTags() routine does not update the canonical link accordingly. It's still populated as HTTP even though the entire store is HTTPS.

This causes redirect issues with places like Facebook. Facebook sees the HTTPS url, but then takes the specifical HTTP canonical link as gospel and tries to hit it. But hitting the HTTP url forces a redirect back to HTTPS. So Facebook gets stuck in a redirect loop trying to hit a canonical url that will always force a redirect and it just loops over and over.

In the Facebook debugger, you'll see this:
Capture.JPG
The underlying reason for this is the Store Url in the Configure->Security->System Settings page. When you enable SSL on all pages, the store url is not updated accordingly. So this causes pages to render with a HTTP canonical url while the actual page is HTTPS.

I tested updating the store url to HTTPS, and it seems to be a suitable workaround. Facebook seems to like it just fine now.

I looked in the R11 SR patch notes, didn't see this one listed. So I thought I would mention it in case anyone else encountered it.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: R11 Canonical link not updated when Storewide SSL enabled

Post by Katie » Fri Feb 19, 2016 5:37 am

In the SSL patch and the SR1 patch for Gold R11, we fixed issue AC8-2990 (Sitemap should generate HTTPS based URLs for secure pages.) by adding some javascript to the SSL configuration page so the Store URL would change from http to https. This change was actually required for other SSL issues like the links generated in the email templates.

The name of the bug report didn't accurately describe what we did because it described the symptom of the issue instead.

Sorry if there was any confusion. If you have any other stores using the "Secure all pages" feature, make sure to apply the SSL patch at a minimum. The SR1 update would be better and it includes all the issues fixed in the SSL patch.

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: R11 Canonical link not updated when Storewide SSL enabled

Post by AbleMods » Fri Feb 19, 2016 5:52 am

Perfect Katie, thanks for the detail. Hey at least I checked the patch notes first this time :)

We're planning on starting the SR merge today. We definitely want to get it implemented and thanks so much for putting one together !
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply