Defect #40655
closed
Revisions count is wrong on the wiki content page
Added by Karel Pičman 8 months ago.
Updated 6 months ago.
Description
It shows the number of the last revision instead of count of revisions
Files
- Tracker changed from Patch to Defect
- Status changed from New to Confirmed
- Target version set to Candidate for next major release
Thank you for reporting the issue. I am attaching an updated patch with a test code.
The original patch raises an exception when rendering a specific version of a Wiki page. The attached patch includes the fix for it.
ActionView::Template::Error (undefined method `versions' for an instance of WikiContentVersion):
85: <p class="wiki-update-info">
86: <% if User.current.allowed_to?(:view_wiki_edits, @project) %>
87: <%= wiki_content_update_info(@content) %>
88: · <%= link_to l(:label_x_revisions, :count => @content.versions.all.size), {:action => 'history', :id => @page.title} %>
89: <% end %>
90: <% if @page.protected? %>
91: <span class="badge badge-status-locked"><%= l('status_locked') %></span>
app/views/wiki/show.html.erb:88
- Target version changed from Candidate for next major release to 5.0.10
Setting the target version to 5.0.10.
- Status changed from Confirmed to Resolved
- Assignee set to Go MAEDA
Committed the fix in r22877. Thank you for your contribution.
- Status changed from Resolved to Closed
- Resolution set to Fixed
Merged the fix to the stable branches.
Also available in: Atom
PDF