Defect #21900

Moving a page with a child raises an error if target wiki contains a page with the same name as the child

Added by Hiroo Hayashi over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Wiki
Target version:3.1.4
Resolution:Fixed Affected version:3.2.0

Description

Project A has Wiki pages, "Wiki-P" and "Wiki-C". "Wiki-C" is a child of "Wiki-P".
Project B has an Wiki page, "Wiki-C".

Project A:
Wiki-P
  Wiki-C

Project B:
Wiki-C

Moving "Wiki-C" in Project A to Project B warns as "Title has already been taken".
Moving "Wiki-P" in Project A to Project B causes an internal error.


bitnami@linux:~/redmine/htdocs$ ruby bin/about

sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
  Redmine version                3.2.0.stable
  Ruby version                   2.1.8-p440 (2015-12-16) [x86_64-linux]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.13
  Git                            2.6.1
  Filesystem

Associated revisions

Revision 15130
Added by Jean-Philippe Lang over 2 years ago

Fixed that moving a wiki page with a child raises an error when target wiki contains a page with the same name as the child (#21900).

History

#1 Updated by Jean-Philippe Lang over 2 years ago

  • Subject changed from Moving wiki pages cause an internal error to Moving a page with a child raises an error if target wiki contains a page with the same name as the child
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.1.4
  • Resolution set to Fixed

Fixed in r15130, thanks for poiting this out.

#2 Updated by Hiroo Hayashi over 2 years ago

Thank you for your prompt fix.

I found this bug because I wanted to know how this function, moving Wiki pages, works.
RedmineWikis has no description about it yet. #5450 was this only clue, but has little information.

The following is my understanding for RedmineWikis. I still don't understand the behavior of the last sentence. (I'm not familiar with Ruby and am not sure how your fix works.)


Renaming and moving a wiki page

To rename a wiki page and move a wiki page and its children to other project, click on Rename.

If 'Redirect existing links' is checked, existing links to the current page are redirected to the wiki page renamed or moved. Links to the children-pages move to other project are not redirected. To stop the redirection see a workaround in #6401#note-8.

You can specify a parent page by 'Parent page'.

You can also specify a destination project by 'Project'. Moving a page with a child raises an error if target wiki contains a page with the same name as the child. In this case no pages are moved (or moved partially and parent-children relationship need to be fixed???).

#3 Updated by Jean-Philippe Lang over 2 years ago

After the fix, the last paragraph would be:

You can move a page to another project by specifying the destination project in 'Project'. When moving a page, each child page is also moved unless the destination project contains a page with the same name.

#4 Updated by Hiroo Hayashi over 2 years ago

Good. That is I expected.

Submissions says

Submitting a Wiki improvement

When you edit a wiki page to improve its content, make sure that you fill the comment field with a descriptive summary of the changes you've made to the page. This way we'll be better able to "monitor" and "maintain" the quality of the actual wiki content.

May I edit the wiki page?

#5 Updated by Jean-Philippe Lang over 2 years ago

Hiroo Hayashi wrote:

May I edit the wiki page?

Sure

#6 Updated by Hiroo Hayashi over 2 years ago

May I edit the wiki page?

Sure

I did it. I added some more changes.

Please double-check, since English is not my first language.

#7 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF