Defect #43526
closedWhen using the include macro in the project description, an execution error occurs in the project list (list view)
0%
Description
When the include macro is used in a project’s description, it renders correctly on the project overview and the project list in board view, but it fails with an error in the project list in list view.
Steps to reproduce:- Add
{{include(WikiPageName)}}to the project description.- Open the project overview page – the macro is rendered correctly.
- Open the project list (board view) – the macro is rendered correctly.
- Open the project list (list view) – the macro fails to render and the following error is shown instead of the description.
Error executing the include macro (Page not found)
Possible cause:
In the project list list view, @project is not set when rendering the project description. Because of that, the include macro cannot determine which project’s wiki page it should load, and it results in a “Page not found” error.
When the project is explicitly specified, such as {{include(projectname:WikiPageName)}}, the macro works correctly in all views, including the project list list view.
Files
Updated by Mizuki ISHIKAWA 23 days ago
- File 0001-Fix-include-and-recent_pages-macros.patch 0001-Fix-include-and-recent_pages-macros.patch added
In this patch, the macros no longer rely solely on
@project. Instead, the project is resolved in the following order:
@project(as before)- the object itself, if it is a Project
obj.project, if the object responds to it (e.g. issue.project)
With this change, {{include(WikiPageName)}} works consistently in all views, including the project list list view. The same fix has also been applied to the recent_pages macro, which had the same underlying issue.
Additionally, in ProjectsHelper, the rendering of short_description has been changed to use textilizable(project, :short_description, ...), so that the project object is explicitly passed to the macro instead of relying on @project.
Updated by Florian Walchshofer 23 days ago
I recommended this patch, which also resolved the issue addressed by the other patch.
#43372
Updated by Marius BĂLTEANU 16 days ago
- Assignee set to Marius BĂLTEANU
- Target version set to Candidate for next minor release
Updated by Marius BĂLTEANU 16 days ago
Go MAEDA, do you see any problem in we deliver this fix in minor versions?
Updated by Marius BĂLTEANU 12 days ago
- Status changed from New to Resolved
- Target version changed from Candidate for next minor release to 6.0.8
- Resolution set to Fixed
Patch committed, thanks!
Updated by Marius BĂLTEANU 12 days ago
- Status changed from Resolved to Closed
- Target version changed from 6.0.8 to 6.1.1
Merged only to 6.1-stable branch, on 6.0 there are conflicts. Please let me know if we should back port this to 6.0 also.