WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#25138 closed defect (bug) (invalid)

Typo in revisions count

Reported by: 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 8 months ago.
Initial patch to remove + character

Download all attachments as: .zip

Change History (8)

Jonnyauk8 months ago

Initial patch to remove + character

comment:1 ocean908 months 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.

comment:2 claudiosanches8 months 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 8 months ago by claudiosanches (previous) (diff)

comment:3 Jonnyauk8 months 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.

comment:4 nacin8 months 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.

comment:5 follow-up: Jonnyauk8 months ago

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

comment:6 in reply to: ↑ 5 nacin8 months 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.

comment:7 SergeyBiryukov8 months ago

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