Project

General

Profile

Actions

Defect #40655

open

Revisions count is wrong on the wiki content page

Added by Karel Pičman about 1 month ago. Updated 4 days ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Wiki
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

It shows the number of the last revision instead of count of revisions


Files

number_of_revisions.diff (726 Bytes) number_of_revisions.diff Karel Pičman, 2024-05-03 17:20
clipboard-202405031721-7rb9m.png (8.73 KB) clipboard-202405031721-7rb9m.png Karel Pičman, 2024-05-03 17:21
40655.patch (1.68 KB) 40655.patch Go MAEDA, 2024-06-06 12:38
Actions #1

Updated by Go MAEDA 7 days ago

  • Tracker changed from Patch to Defect
  • Status changed from New to Confirmed
  • Target version set to Candidate for next major release
Actions #2

Updated by Go MAEDA 4 days ago

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
Actions

Also available in: Atom PDF