Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25138 closed defect (bug) (invalid)

Typo in revisions count

Reported by: jonnyauk's profile Jonnyauk Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Revisions Keywords: has-patch
Focuses: Cc:

Description

If you have added a filter to wp_revisions_to_keep to alter the number of post revisions saved, an unnecessary (and possibly confusing) + character is outputted after the number of revisions in the publish metabox.

Simple patch attached that removes character.

Attachments (1)

25138-01.patch (854 bytes) - added by Jonnyauk 11 years ago.
Initial patch to remove + character

Download all attachments as: .zip

Change History (8)

@Jonnyauk
11 years ago

Initial patch to remove + character

#1 @ocean90
11 years ago

  • Keywords close added
  • Severity changed from minor to normal

That's not a typo. The + sign should show that there can be more revisions if they aren't limited. See also the title which should come up on mouse over:

Your site is configured to keep only the last %s revisions.

#2 @claudiosanches
11 years ago

Plus sign (+) indicates only that row has been added.
And minus sign (-) when it was deleted.
It's all right with that.

Example of how it works diff tool somewhere else: https://gist.github.com/helenhousandi/1573966/revisions

And see your patch file and click on "Unified".

Last edited 11 years ago by claudiosanches (previous) (diff)

#3 @Jonnyauk
11 years ago

Ah - I understand, thanks! However, I'd still propose that it could be potentially confusing to normal 'end' users. If the developer has limited the revisions for a reason, does the normal end user need to have an indication that there is the capability for more revisions?

@ocean90 - thanks for your theory behind this - and it does make sense from that perspective. If I have a post with 5 revisions available, then change the filter to 3 and go back to edit the post it should indicate if there are more revisions available with the + sign.

However, once I've made amendments to the post and saved again, the amount of revisions saved (and available) in the database is limited by the filter - so there are only 3 available in this example, yet it still shows +

This is why I think this is either redundant or needs a slightly different patch created to compare revisions available with the current limit - and then only in that case show the + if there are more revisions available than the current limit.

#4 @nacin
11 years ago

"Revisions: X" is not just to link to the new revisions screen, but also to provide the user a data point. For example, "this post underwent 65 individual changes while drafting it". It isn't much different than a word count metric. It is also better than the long, ridiculous meta box that otherwise serves little purpose.

If the install is restricted to 3 revisions, but a user has saved 5 times, then they have edited that post 3+ times. Technically, if they have only saved 3 times, it still shows "3+". You can read "3+" as "3 or more". The fourth save will again continue to show "3+".

So just keep in mind it isn't just about what is stored — the actual count could be useful or interesting to someone.

#5 follow-up: @Jonnyauk
11 years ago

@nacin ah - I understand the decision behind this now - thanks for the explanation.

#6 in reply to: ↑ 5 @nacin
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Replying to Jonnyauk:

@nacin ah - I understand the decision behind this now - thanks for the explanation.

No problem.

#7 @SergeyBiryukov
11 years ago

  • Keywords close removed
  • Version changed from trunk to 3.6
Note: See TracTickets for help on using tickets.