<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Transition Technology: Ticket #519: Fixing various URL in the Database</title>
    <link>http://localhost:8080/trac/ticket/519</link>
    <description>&lt;p&gt;
This page:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://transitionnetwork.org/support/what-transition-initiative"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://transitionnetwork.org/support/what-transition-initiative&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Contains this HTML:
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;p&amp;gt;&amp;lt;img alt="TransitionSantaCruz" src="http://transitionsc.org/sites/www.transitionnetwork.org/files/pixture_reloaded_logo.png" align="right" height="69" width="150"&amp;gt;&amp;lt;/p&amp;gt;
&lt;/pre&gt;&lt;p&gt;
The image is a 404:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://transitionsc.org/sites/www.transitionnetwork.org/files/pixture_reloaded_logo.png"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://transitionsc.org/sites/www.transitionnetwork.org/files/pixture_reloaded_logo.png&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
The correct location for the image is:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://transitionsc.org/sites/default/files/pixture_reloaded_logo.png"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://transitionsc.org/sites/default/files/pixture_reloaded_logo.png&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Looking at the Internet Archive this was correct back in October 2012,
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://web.archive.org/web/20121022030350/http://www.transitionnetwork.org/support/what-transition-initiative"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://web.archive.org/web/20121022030350/http://www.transitionnetwork.org/support/what-transition-initiative&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Their munged HTML contains the correct URL:
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;p&amp;gt;&amp;lt;a href="/web/20121022030350/http://transitionsc.org/sites/default/files/pixture_reloaded_logo.png" class="colorbox initColorbox-processed cboxElement"&amp;gt;
&lt;/pre&gt;&lt;p&gt;
It appears to me that an edit must have been done on the database something like:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s;/sites/default/files/;/sites/www.transitionnetwork.org/files/;
&lt;/pre&gt;&lt;p&gt;
There might well be other URLs to other Drupal sites that were changed when they shouldn't have been?
&lt;/p&gt;
&lt;p&gt;
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:
&lt;/p&gt;
&lt;pre class="wiki"&gt;grep "sites/www.transitionnetwork.org/files" /var/backups/mysql/sqldump/transitionnetwor.sql | wc -l
113
&lt;/pre&gt;&lt;p&gt;
I did notice that there are a lot of URLs in the database like this:
&lt;/p&gt;
&lt;pre class="wiki"&gt;src=\"http://www.transitionnetwork.org/sites/www.transitionnetwork.org/files/uploaded/u5857/Map-TransitionNetworkOffice.jpg\"
&lt;/pre&gt;&lt;p&gt;
And
&lt;/p&gt;
&lt;pre class="wiki"&gt;src=\"https://www.transitionnetwork.org/sites/www.transitionnetwork.org/files/uploaded/u4/transition%20companion%20cover.jpg\"
&lt;/pre&gt;&lt;p&gt;
Both the above links would be better starting with &lt;tt&gt;/&lt;/tt&gt; or &lt;tt&gt;//www.transitionnetwork.org/&lt;/tt&gt; as this would avoid people getting HTTPS content when using HTTP and also getting HTTP content when using HTTPS.
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
&lt;p&gt;
I'd be happy to do this task. Ed, Jim, any thoughts about when would be a good time to do it?
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>Transition Technology</title>
      <url>/trac/chrome/site/TransitionNetwork-Logo-Web-Small.jpg</url>
      <link>http://localhost:8080/trac/ticket/519</link>
    </image>
    <generator>Trac 0.12.5</generator>
    <item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Tue, 19 Mar 2013 17:06:16 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/519#comment:1</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/519#comment:1</guid>
      <description>
        &lt;p&gt;
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 &lt;a class="new ticket" href="http://localhost:8080/trac/ticket/523" title="defect: Database intergrity (new)"&gt;#523&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Wed, 08 May 2013 16:43:29 GMT</pubDate>
      <title>milestone set</title>
      <link>http://localhost:8080/trac/ticket/519#comment:2</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/519#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                set to &lt;em&gt;Maintenance&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
moving to maintenance out of no milestone
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>