{"id":2925,"date":"2017-11-13T00:14:59","date_gmt":"2017-11-13T00:14:59","guid":{"rendered":"http:\/\/www.toobusyto.org.uk\/tooBusy\/?p=2925"},"modified":"2017-11-13T00:16:15","modified_gmt":"2017-11-13T00:16:15","slug":"repairing-broken-links-on-this-site","status":"publish","type":"post","link":"https:\/\/www.toobusyto.org.uk\/tooBusy\/2017\/11\/13\/repairing-broken-links-on-this-site\/","title":{"rendered":"Repairing broken links on this site"},"content":{"rendered":"<p>Whilst browsing the <a href=\"https:\/\/www.google.com\/webmasters\/tools\/home?hl=en\">Google Search Console<\/a> for this site I noticed that some of my <a href=\"\/images\/phish\">older image galleries<\/a> were returning errors. This gallery is run by 15 year old <a href=\"https:\/\/github.com\/ned21\/phish\">PHP code<\/a> that I occasionally have to hack to keep running on newer versions of PHP so it was not a complete surprise that it might need some fixing.  I should pay more attention to webserver upgrade notices though as the logs indicate it has been broken since 1st October.<\/p>\n<p>The error was a bit puzzling at first:<br \/>\n<code>PHP Parse error:  syntax error, unexpected end of file<\/code><br \/>\nbut eventually a helpful StackOverflow page made me realise that I needed to replace all instances of <code>&lt;?<\/code> with <code>&lt?php<\/code> and the problem was solved.<\/p>\n<p>During testing of the fix I found a more serious problem. All my links to picasaweb albums where I had hosted my photos from 2008 and 2009 were dead. This was unexpected since Picasa was run by Google and even though they replaced the service with Google Plus\/Photos, I knew all my photos and albums were still online at the latest incarnation of Google&#8217;s service and I had trusted that Google, a company who place high importance on links for generating their search results, would not break links. It turns out that my trust was mis-placed as Google had broken some links but not others. <a href=\"https:\/\/support.google.com\/picasa\/answer\/6383491?hl=en-GB\">Any link containing a username was broken but a userid would still work<\/a>. So, if I could find my user id I could restore the links. Fortunately my Picasa user id turned out to be the same as my Google Plus user id, and because this was only a small number of posts over a 2 year period I could work through each one and replace the user name with that id to repair the link. There were a few direct links to photos that I was unable to repair because the URL did not contain my username.<\/p>\n<p>These problems make me want to <a href=\"\/tooBusy\/2015\/10\/14\/too-busy-to-flickr-galleries\/\">reconsider<\/a> whether my current photo hosting solution with Flickr is the right one. While WordPress has improved since 2015, and has add-on features to make photograph-heavy websites go faster, those add-ons are still third-party integrations so these potential problems of what is known as &#8220;link rot&#8221; remain. I have recently been thinking about some of the other disadvantages of using WordPress, but I shall leave those for another post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whilst browsing the Google Search Console for this site I noticed that some of my older image galleries were returning errors. This gallery is run by 15 year old PHP code that I occasionally have to hack to keep running on newer versions of PHP so it was not a complete surprise that it might &hellip; <a href=\"https:\/\/www.toobusyto.org.uk\/tooBusy\/2017\/11\/13\/repairing-broken-links-on-this-site\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Repairing broken links on this site&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2925","post","type-post","status-publish","format-standard","hentry","category-geeky"],"_links":{"self":[{"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/posts\/2925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/comments?post=2925"}],"version-history":[{"count":0,"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/posts\/2925\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/media?parent=2925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/categories?post=2925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.toobusyto.org.uk\/tooBusy\/wp-json\/wp\/v2\/tags?post=2925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}