Project

General

Profile

Actions

Defect #40655

closed

Revisions count is wrong on the wiki content page

Added by Karel Pičman 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Wiki
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
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 5 months 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 5 months 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 #3

Updated by Go MAEDA 5 months ago

  • Target version changed from Candidate for next major release to 5.0.10

Setting the target version to 5.0.10.

Actions #4

Updated by Go MAEDA 5 months ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA

Committed the fix in r22877. Thank you for your contribution.

Actions #5

Updated by Karel Pičman 5 months ago

You are welcome.

Actions #6

Updated by Go MAEDA 5 months ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Merged the fix to the stable branches.

Actions

Also available in: Atom PDF