https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292021-09-21T13:22:59ZRedmineRedmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualhttps://www.redmine.org/issues/35885?journal_id=1041552021-09-21T13:22:59ZHolger Just
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/26522">Patch #26522</a>: Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/</i> added</li></ul> Redmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualhttps://www.redmine.org/issues/35885?journal_id=1041572021-09-21T13:27:40ZHolger Just
<ul></ul><p>Unfortunately, the previous routing implementation could lead to the wrong route being selected if there was e.g a directory named <code>raw</code> in the default repository.</p>
<p>As such, the routing behavior was changed in <a class="version" href="https://www.redmine.org/versions/99">4.0.0</a> with <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/ (Closed)" href="https://www.redmine.org/issues/26522">#26522</a> to remove the routes without an explicit repository id and to make sure we always select the correct action and repo path.</p> Redmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualhttps://www.redmine.org/issues/35885?journal_id=1041612021-09-21T23:44:40ZMischa The Evil
<ul></ul><p>Wim Bertels wrote:</p>
<blockquote>
<p>[...]<br />So after upgrading, none of the links referring to repository with a name identifiers still work,<br />as they all point to <a class="external" href="https://../projects/../repository/raw/">https://../projects/../repository/raw/</a>.. instead of <a class="external" href="https://../projects/../repository/repo_name_identifier/raw/">https://../projects/../repository/repo_name_identifier/raw/</a>..</p>
</blockquote>
<p>Holger Just wrote:</p>
<blockquote>
<p>[...]<br />As such, the routing behavior was changed in <a class="version" href="https://www.redmine.org/versions/99">4.0.0</a> with <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/ (Closed)" href="https://www.redmine.org/issues/26522">#26522</a> to remove the routes without an explicit repository id and to make sure we always select the correct action and repo path.</p>
</blockquote>
<p>Just for the clarity on this matter, I presume that Redmine links ('source:', 'export:') were not affected by this change (i.e. they link to the new routes) as opposed to direct links which are affected as reported in this issue.</p>
<p>With that being said, it shouldn't be very difficult to restore the prior behavior by adding the removed routes to a custom plugin in case you are sure that you won't be affected by the issue reported in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/ (Closed)" href="https://www.redmine.org/issues/26522">#26522</a>.</p> Redmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualhttps://www.redmine.org/issues/35885?journal_id=1041672021-09-22T08:14:05ZWim Bertels
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p>[...]<br />Just for the clarity on this matter, I presume that Redmine links ('source:', 'export:') were not affected by this change (i.e. they link to the new routes) as opposed to direct links which are affected as reported in this issue.</p>
<p>With that being said, it shouldn't be very difficult to restore the prior behavior by adding the removed routes to a custom plugin in case you are sure that you won't be affected by the issue reported in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/ (Closed)" href="https://www.redmine.org/issues/26522">#26522</a>.</p>
</blockquote>
<p>that is helpful, i guess there is no way to hide 'source:' or 'export:' from the endviewer (as one can do with <a href="https://www.redmine.org" class="external">link to redmine</a>)</p>
<p>--</p>
<p>i have looked at the db schema: it seems there a table wiki_contents and wiki_content_versions that hold the actual content of the wiki pages.</p>
<p>do you think it would be a problem using a direct UPDATE statement to change the affected links in the table wiki_contents</p>
small test done:
<ol>
<li>made a fresh wikipage with some content, </li>
<li>UPDATE wiki_content_version table of that fresh wikipage</li>
</ol>
result:
<ol>
<li>only 1 version in wiki_content_versions as expected</li>
<li>different content in wiki_contents</li>
<li>this different content gets shown on the wiki-website, but can't be found in the history</li>
</ol>
continu:
<ol>
<li>edit this wikipage from redmine, a second version appears, the previously UPDATED content (together with this edit) is archived in the history as 1 version together</li>
</ol>
<p>this behaviour is fine for my usecase, or do you expect problems with this approach?</p> Redmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualhttps://www.redmine.org/issues/35885?journal_id=1041872021-09-24T15:32:33ZWim Bertels
<ul></ul><p>If someone else experiences the same problem:</p>
<p><a href="https://projektwerk.ucll.be/projects/extensions4redmine/repository/git-repo/revisions/master/entry/db_manipulations/fix_old_wiki_links_without_repo_identifier.sql" class="external">fix_old_wiki_links_without_repo_identifier.sql</a> is a template for a script to change this in the database, use at own risk, no warranty</p>
<p>HTH</p>