https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-07-25T05:49:02ZRedmineRedmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=650362015-07-25T05:49:02ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li><li><strong>Resolution</strong> set to <i>Cant reproduce</i></li></ul><p>This all seems to be the expected behaviour. I'll elaborate based on your steps.</p>
<blockquote>
<p>3. Click „Rename“ and move it to B.</p>
</blockquote>
<p>By default, the checkbox for "Redirect existing links" is checked on the rename form. So, in this - default - case you tell Redmine to create a wiki-redirect like:<br /><pre>A - Wiki 'Start page' --->> B - Wiki 'Start page'</pre></p>
<blockquote>
<p>4. In A, click „Wiki“ tab. You're automatically redirected to Wiki of B. This is the first part of the issue.</p>
</blockquote>
<p>This happens because of the wiki-redirect added in step 3. This can be changed however by unchecking the "Redirect existing links" checkbox. In that case the user won't be redirected and, with the permissions of project A, will be presented the editor to create the new page (if (which is in this case also the Wiki 'Start page').</p>
<blockquote>
<p>5. Grant access to A to any user, but don't grant access to B. Now she will get 404 trying to view Wiki of A. This is the second part.</p>
</blockquote>
<p>This happens - again - because of the redirect. If a redirect to another project exists for the wiki 'Start page', clicking the 'Wiki' menu item in project A will load the redirected page in project B. As such permissions of the user on project B will apply. If the user doesn't have the permission to view wiki pages of project B - the case in your scenario -, a 404 response will be served.</p>
<blockquote>
<p>It seems that Wiki of A no longer exists. Turning Wiki module of A off and then on doesn't solve the issue. [...]</p>
</blockquote>
<p>Well, if you move the wiki 'Start page' with a redirect to a page in another project (B), you are effectively shutting down access to project A's wiki. This is because the wiki 'Start page' is used as the target of the 'Wiki' project menu item. Without the redirect the editor shows up normally, indicating that the wiki exists and is activated.<br />Turning the Wiki module on/off won't do anything. It only disables the 'Wiki' project menu item for the project and disables rendering of any wiki page by returning 403 responses.</p>
<blockquote>
<p>[...] Renaming the Wiki back to A works fine, but then there's no Wiki in B, and so on.</p>
</blockquote>
<p>Well, you <em>are not renaming</em> the wiki page. You are actually <em>moving the wiki page</em> (to another project) <em>using</em> the <em>rename form</em>. This is by design (see <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Move wiki page to other project (Closed)" href="https://www.redmine.org/issues/5450">#5450</a>).<br />By moving a wiki page you actually move it (with its history). You <em>don't make</em> a <em>copy</em>. As such, a moved page will <em>only</em> exist in the target project after the move, leaving the base wiki page empty (this is why, if no redirect is added during the page move, your user would be presented with the editor to create a new wiki page in project A in step 4 - using wiki 'Start page' as the name for it - [note: only when the user has the 'Edit wiki page' permission on project A]).</p>
<blockquote>
<p>Unfortunately, I don't know the exact version of Redmine I'm using, and have no privileges to discover it. I think it's relatively fresh, [...]</p>
</blockquote>
<p>Looking at the history of the wiki page move feature, you are running either 3.0.x or trunk >= <a class="changeset" title="Move wiki page to other project (#5450)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13643">r13643</a>.</p>
<p>I hope this sheds some light on the experienced behaviour. In my opinion everything works as expected. Can you provide some feedback? Thanks.</p>
<p>Regards, Mischa.</p> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=651162015-07-27T11:55:13ZGeorge Tudosi
<ul></ul><p>Hi Mischa,</p>
<p>thanks a lot for the explanation. I've missed the redirect flag, so yes, it works as expected if one walks through the steps I described.</p>
<p>But how to recover from such condition? I've tried „renaming“ the wiki of A to move it to B, and unset the redirect checkbox. Nothing changed—now I have a wiki in B, and the menu link from A still redirects to it.</p> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=654302015-08-15T08:14:43ZToshi MARUYAMA
<ul><li><strong>Category</strong> set to <i>Wiki</i></li></ul> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=654342015-08-15T08:33:57ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/5450">Feature #5450</a>: Move wiki page to other project</i> added</li></ul> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=654352015-08-15T08:41:19ZToshi MARUYAMA
<ul></ul><p>George Tudosi wrote:</p>
<blockquote>
<p>But how to recover from such condition? I've tried „renaming“ the wiki of A to move it to B, and unset the redirect checkbox. Nothing changed—now I have a wiki in B, and the menu link from A still redirects to it.</p>
</blockquote>
<p>AFAIK, there is no way.<br />Could you create new feature request?</p> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=658272015-09-07T06:19:41ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20525">Defect #20525</a>: Move WIKI page bug - renaming and moving default or other WIKI page, results in FIXED link to new project</i> added</li></ul> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=658292015-09-07T06:23:02ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>New</i></li><li><strong>Resolution</strong> deleted (<del><i>Cant reproduce</i></del>)</li></ul> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=658312015-09-07T06:23:54ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20525">Defect #20525</a>: Move WIKI page bug - renaming and moving default or other WIKI page, results in FIXED link to new project</i>)</li></ul> Redmine - Defect #20356: Wiki gets destroyed after renamehttps://www.redmine.org/issues/20356?journal_id=658342015-09-07T06:24:00ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20525">Defect #20525</a>: Move WIKI page bug - renaming and moving default or other WIKI page, results in FIXED link to new project</i> added</li></ul>