Saturday 30 May 2015

Wordpress SSL causes 404 for images

After installing first a self-signed SSL certificate (replaced with a free Comodo SSL certificate in order to troubleshoot this problem) I installed Wordpress and started building a WooCommerce-based store. Because I'd installed Wordpress on the https:// site, the Settings > General screen automatically configured the site address as https://

All was going well apart from a niggling problem with images not displaying on the site itself (anonymously) or logged into the WP dashboard. Inspecting the image HTML in Chrome allowed me to extract the full problem URL and I found I could load the image successfully in its own window. Chrome also allowed flagged the 404 response for images when loaded through the Wordpress page. Weird.

Apart from images I uploaded to the Media library, other images being served locally from my Wordpress installation (e.g. theme thumbnails) were also failing to load.

I found that by changing the site address (again in WP > Settings > General) to http:// (not https://) the images would display so I came to believe the problem was somehow related to SSL. Interestingly, after changing this setting, the images appeared when I browsed to either the http:// or https:// site. Images on the http:// site using absolute image references to the https:// site also worked.

After a bit of head scratching and a bit of searching around (this problem doesn't seem to be particularly common), I came across this page which suggests hotlink protection can cause problems for the SSL protocol. Apparently "HTTPS is configured correctly when resources that are available via HTTP are also available via HTTPS." As far I could tell, my images were available through both HTTP and HTTPS but I had enabled hotlink protection on the site before installing Wordpress.

Sure enough, disabling hotlink protection solved the problem.


Thursday 28 May 2015

Windows Live Writer and Blogger returned the following error: Notfound: not found

Ah Windows Live Writer--you've been there all along and now you're not working because Google ended support for ClientLogin OAuth 1 (3LO), AuthSub, and OpenID2. Great for Google, no doubt, not so great for the thousands of users still clinging to WLW.

Microsoft insiders (Scott Hanselman) are talking about open sourcing Windows Live Writer, which would be great as the application hasn't seen any major updates since the 2012 product release. Hanselman has also suggested a fix may be a while off--in the hands of the open source community. 

Apparently Google is also considering a fix at their end, which would be great to keep us bloggers running in the meantime: https://plus.google.com/u/0/+RickDoyle/posts/GUPJcu5sZHo

Update: a few workarounds have popped up around the web:
  1. View source in WLW and copy/paste into Blogger (web). See http://mybeerbuzz.blogspot.com.au/2015/05/blogger-windows-live-writer-blogger.html
  2. Configure posting by email. See http://www.hackinguniversity.in/2015/05/live-writer-not-found-error.html
Update 2 (3 June 2015): seems to be working again as expected :-)

If you found this post helpful, please support my advertisers.