Defect #24869

Circular inclusion detected when including a wiki page with the same name

Added by Michael Esemplare 2 months ago. Updated about 1 month ago.

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

0%

Category:Wiki
Target version:3.2.6
Resolution:Fixed Affected version:3.3.2

Description

A Circular inclusion is incorrectly identified when including a page internal to a project with the same name from another project. This affects version prior to and including 3.3.2. To recreate:

  1. Create test-project-1
  2. Create wiki page named "IncludedPage" with any contents
  3. Create test-project-2
  4. Create wiki page named "IncludedPage"; contents include to test-project-1: {{include(test-project-1:IncludedPage)}}
  5. Create wiki page named "TestPage"; contents include to local IncludedPage: {{include(IncludedPage)}}

In test-project-2/IncludedPage there is no error, however in test-project-2/TestPage the circular inclusion is detected.

Suggest modifying lib/redmine/wiki_formatting/macros.rb to use page.id instead of page.title.

0002-Modify-circular-inclusion-test-to-use-page.id-instea.patch Magnifier (1.25 KB) Michael Esemplare, 2017-01-18 21:48

circular-inclusion-error.png (6.62 KB) Go MAEDA, 2017-01-19 14:42

Associated revisions

Revision 16227
Added by Jean-Philippe Lang 2 months ago

Modify circular inclusion test to use page.id instead of page.title (#24869).

Patch by Michael Esemplare.

History

#1 Updated by Michael Esemplare 2 months ago

  • File 0001-Modify-circular-inclusion-test-to-use-page.id-instea.patch added

#2 Updated by Michael Esemplare 2 months ago

Incorrect patch previously uploaded. Please remove 0001 and use 0002 instead.

#3 Updated by Go MAEDA 2 months ago

  • Category set to Wiki

#4 Updated by Go MAEDA 2 months ago

  • File deleted (0001-Modify-circular-inclusion-test-to-use-page.id-instea.patch)

#5 Updated by Go MAEDA 2 months ago

Confirmed the problem and the patch works fine as expected.

#6 Updated by Jean-Philippe Lang 2 months ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed, thanks.

#7 Updated by Jean-Philippe Lang about 1 month ago

  • Subject changed from False Positive: Circular Inclusion Detected for include macro to Circular inclusion detected when including a wiki page with the same name
  • Status changed from Resolved to Closed
  • Target version changed from 3.3.3 to 3.2.6

Also available in: Atom PDF