Ticket #519 (new defect)
Fixing various URL in the Database
Reported by: | chris | Owned by: | chris |
---|---|---|---|
Priority: | minor | Milestone: | Maintenance |
Component: | Drupal modules & settings | Keywords: | |
Cc: | jim, ed | Estimated Number of Hours: | 0.0 |
Add Hours to Ticket: | 0 | Billable?: | yes |
Total Hours: | 0 |
Description
This page:
Contains this HTML:
<p><img alt="TransitionSantaCruz" src="http://transitionsc.org/sites/www.transitionnetwork.org/files/pixture_reloaded_logo.png" align="right" height="69" width="150"></p>
The image is a 404:
The correct location for the image is:
Looking at the Internet Archive this was correct back in October 2012,
Their munged HTML contains the correct URL:
<p><a href="/web/20121022030350/http://transitionsc.org/sites/default/files/pixture_reloaded_logo.png" class="colorbox initColorbox-processed cboxElement">
It appears to me that an edit must have been done on the database something like:
s;/sites/default/files/;/sites/www.transitionnetwork.org/files/;
There might well be other URLs to other Drupal sites that were changed when they shouldn't have been?
I have had a quick look at the database dump and couldn't find any examples of this problem, but there are 113 lines to check:
grep "sites/www.transitionnetwork.org/files" /var/backups/mysql/sqldump/transitionnetwor.sql | wc -l 113
I did notice that there are a lot of URLs in the database like this:
src=\"http://www.transitionnetwork.org/sites/www.transitionnetwork.org/files/uploaded/u5857/Map-TransitionNetworkOffice.jpg\"
And
src=\"https://www.transitionnetwork.org/sites/www.transitionnetwork.org/files/uploaded/u4/transition%20companion%20cover.jpg\"
Both the above links would be better starting with / or //www.transitionnetwork.org/ as this would avoid people getting HTTPS content when using HTTP and also getting HTTP content when using HTTPS.
I think it would be worth putting the site into maintenance mode, doing a dump of the database, checking these 113 lines for issues like those above, correcting them all and then reinserting the data, however this would need to be done at a suitable time.
I'd be happy to do this task. Ed, Jim, any thoughts about when would be a good time to do it?
Jim's going to wrap the PSE and BOA work then take a break and come back as someone less frequent, but deeper. So there will be a period of no Jim for a bit. Therefore I suspect that this will stay on the backburner and could be part of a backend tidy up, so to speak. There are some other database integrity #523