Problem/Motivation

It's confusing when viewing the node/%nid/revisions the current revision is highlighted in green and say's "This is the published revision." even if that node isn't published.

Proposed resolution

To change this text too:

Option One
All: "This is the current revision."

Option Two
Unpublished: "This is the current revision."
Published: "This is the published revision."

Option Three
Unpublished: "This is the current revision (unpublished)."
Published: "This is the current revision."

Other suggestions?

Remaining tasks

Select the best text option.

User interface changes

Current revision text on node comparison page.

API changes

None

#1785742: Diff module string review

Original report by gmclelland

It's confusing when viewing the node/%nid/revisions the current revision is highlighted in green and say's "This is the published revision." even if that node isn't published.

It should probably say "This is the current revision."

Revisions for test | Drupal standard 2013-10-21 15-12-20.jpg

What do you think?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alan D.’s picture

Yep that is a bug ;)

We can probably conditionally show two messages here (if we have context to the [partial?] $node in $var). How about some of these?

This is the current revision.
This is the published revision.

Or

This is the current revision.
This is the current revision (unpublished).

i.e. about line 52, diff.theme.inc for an easy commit credit:

$message = $node->status ? t('This is the current revision.') : t('This is the current revision (unpublished).');

Cross-posted in #1785742: Diff module string review

hass’s picture

Can we keep the "published" wording with the status check, please? Aside the green color should only shown if the revision is published... Like in workbench... We may have forward revisions there that are not yet published, but an older revision is published.

Alan D.’s picture

@hass - which option were you referring to? Option 2?

I updated the issue summary with these to make these easier to track.

hass’s picture

Yes, Option 2

Alan D.’s picture

A not so simple patch for a simple string change!

Cloned node_revision_list() to allow us to insert a new status field into the query, fixed excessive calls to count($revision_list) and removed the redundant second call to node_revision_list().

Now where did those numbers come from... (node.vid as radio labels in screenshot above)

Alan D.’s picture

Slight error in the sql.

-  $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, n.status AS status, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.vid DESC', array(':nid' => $node->nid));
+  $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.status AS status, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.vid DESC', array(':nid' => $node->nid));

And this gives us

gmclelland’s picture

Thanks @Alan D. Your patch in #6 works for me. I tested with the node published and unpublished.

I haven't looked at the code, but those revision numbers might be coming from the https://drupal.org/project/revision_scheduler module?

Alan D.’s picture

Regarding radios: #2068015: Radios missing. Theme issue that should not have been committed and has been reverted. :)

Alan D.’s picture

Issue summary: View changes

Writing an issue summary.

  • Alan D. committed 4fcdd4c on 7.x-3.x
    Issue #2117133 by Alan D., gmclelland, hass: Change "This is the...
Alan D.’s picture

Pushed through :)

Thanks all

Alan D.’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.