Hi,
AFAICT Revisioning currently has the following behaviour which can't be changed.
- The current revision starts as the first revision you make.
- When you publish a revision, that becomes the new current revision.
- When you view a node you see the current revision.
- When you edit a node you edit the current revision.
I want to keep a list of all changes made to a post (even before publishing), so I've selected the option Create new revision: Every time content type is updated.... This means that before the article is published, every time an author views or edits the post, they're shown only the first revision. While a warning message is displayed, my users will ignore it every time;) The same problem crops up after publishing, but this time displaying the last published version.
My preferred behaviour would be:
- View: If there's no published revision, show latest. Otherwise show latest published revision.
- Edit: Edit the most recent revision regardless of how many published or unpublished ones there might be.
This would certainly make things simpler for my users, and ultimately avoid people 'forking' a post, making multiple alterations from a single starting point. Is there a way to get this behaviour? Or maybe another solution to the problem?
Many thanks,
Andy
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | revisioning_reset_vid_pub_only.patch | 619 bytes | Jaza |
Comments
Comment #1
andyf commentedPS Thanks for a great module;)
Comment #2
andyf commentedAnother possibility would be if there were a couple of new fields in Views, similar to the current Node: Edit link, called something like Node: Edit latest revision link and Node: View latest revision link.
Comment #3
Jaza commentedI've made a one-line change to revisioning. This thread seems very related to the change I've made, so I'm going to hijack this thread with my solution. :)
At the moment, revisioning always overrides node.module's default behaviour of setting the most recently created revision to be the current revision. This means that a newly created revision will never be the one that you view (if you just click the 'view' tab, and don't dig through the revisions), and it will never be the one that you edit (if you just click the 'edit' tab, and don't dig through the revisions).
This makes sense when the node is published, because the newly created revision is a pending draft, and you want to keep the old revision active. But it doesn't make sense when the node is unpublished, and when all existing revisions are archived.
So, attached patch changes revisioning's behaviour in this way, so that it doesn't apply to unpublished nodes. Works great for me.
Comment #4
andyf commentedThat's great stuff Jaza, thanks so much!
For me, this patch covers the typical situation of many drafts and one final version (99% of our use cases from the top of my head). On the rare occasion that we want to edit/update an already published post, I fear my users will still end up making multiple 'forks' of the published version tho.
Thanks again,
A.
Comment #5
kesmeby commentedI'm running the latest dev release of Revisioning and it looks like the last three lines of this patch were applied but not the initial if statement. I added that and it seems to have fixed the auto publish bug I was experiencing, why wasn't' that line applied to the dev release?
By the way, thanks for the patch! It looks like a life saver.
Comment #6
origaman commentedI'm actually using Workflow with a "in draft" -> "in review" -> "published" workflow for a site where existing pages get worked on a lot. So there is a major drawback: Every time a node is set to "in draft", it disappears from the site because anonymous users aren't allowed to see it in that state. That's why I'm evaluating using Revisioning additional to Workflow so that the published revision is visible even as the node is being worked on.
The issue discussed here bothers me, too: Without using Revisioning (with only Workflow), what my users (authors and moderators) have to do is quite straightforward. Now when I add Revisioning, things become much more complicated (users have to remember every time not to click the Edit tab as they are used to but to look under Revisions and select the newest one when they'd like to change content). Much degraded usability just because I'd like the published revision of a node not to disappear while it's been worked on.
It would help greatly here if the Edit tab would lead to the latest revision, not the last published one. Even more, I'd prefer to being able to completely hide Revisioning stuff from my users...
Maybe it's a matter of a simple option somewhere.
Comment #7
andyf commentedI don't think so I'm afraid. IIRC if you use the Module Grants panel to access the articles, you jump straight to the revisions page, which is much better than jumping to an out-of-date revision. I'd still prefer to make my own views however (rather than using the Module Grants panel) in which case the problem remains.
I'm moving this to needs work, as only half the problem's been solved. (Having said that, I'm using Jaza's patch, which works great on my site for draft articles - should I open a new issue for the second bit of functionality?)
Comment #8
kesmeby commentedDisregard my original stupid statement, I've just recently learned how to apply patches manually.
Still, thanks for this patch. I hope it makes it into the module as it's a lot more confusing to my users without it.
Comment #9
rdeboerHi All,
Haven't forgotten about this thread.... Some good suggestions. Just very busy at the moment...
Rik
Comment #10
rdeboerHi all,
Re initial post and comment #6:
Andy is right in that clicking on a node's title or on a nearby edit link in general and in the Administer >> Content management >> Content summary in particular, always opens the node's current revision, without offering you a choice as to which revision you'd like to view or edit.
This is why the Accessible content menu option was introduced (which BTW now resides in the Module Grants Monitor submodule that is bundled with Module Grants). When you click on a node's title on the Accessible content page, the navigation is different in that it first shows the user a list of all available revisions, forcing them to pick the right one. It's an extra click compared to Administer >> Content management >> Content, but I'd say well worth it as it makes it blatantly obvious what you're about to view, edit, (un)publish, delete etc.
Also Administer >> Content management >> Content, requires you to give the user the far-reaching "administer nodes" permission, which means that they can do virtually anything with content, more than you'd like to allow them.
If you want to use neither the Accessible content page nor the Content management >> Content page, then I you'll have to create a View, which I understand is the path Andy has chosen. Andy, would you be willing to export your View(s) for us to try?
I guess Revisioning could do with better View support... see #463652: Add Views Support.
Anyway, there may be an opportunity through menu_alter() to approach the behaviour that Andy and origaman are after for the edit and view links in general, and I believe this could be done as an option, i.e. a couple of configurable on/off switches:
o for Edit: a radio-button to toggle the behaviour between edit current (default) revision and edit latest revision
o for View: a radio-button to toggle the behaviour between view current (default) revision and view published, otherwise latest revision
Jaza's patch (#3) may do the job for the use-case mentioned, but has a side-effect in that it breaks Revisioning's definition of "pending" which is:
"a node that has one or more revisions that have an id (timestamp) higher than the current"
With the patch enabled you will no longer be able to distinguish between content that is not yet published (pending) and content that was previously published.
What the patch does is change a node that was considered pending (because it has a revision newer than the current) into an archived node. As such the node will not show up in Revisioning's handy "# revisions pending" block, so isn't flagged to moderators as needing attention, i.e. review and publication.
Comment #11
BenK commentedSubscribing...
Comment #12
rdeboerImplemented pretty much as above (#10).
You need Module Grants 6.x.3.2 (or later) and Revisioning 6.x.3.1 (or later).
See the Administer >> Site configuration >> Revisioning page to configure how edit and view links should behave on your system.
For the moment, both view and edit toggles switch between 'current' and 'latest'. Let's run with this for a while and we'll see what feedback we get.
I'm thinking of adding a third option for view links (and perhaps the equivalent for edit links), which would be the one mentioned above, i.e view current if published, otherwise latest or phrased differently view latest if not published, otherwise current.
Rik
Comment #13
andyf commentedHi Rik,
Sorry for the delay, been jetsetting:)
My editors have to be savvy enough to deal with the idea of revisions anyway and for them I agree 100%. For my standard authors I'd prefer ideally that all they can do is create/edit, and unbeknownst to them every change is recorded. Maybe that's coddling them too much, I don't know. If you're wondering what's the point of recording every change in this case, we have three reasons.
I certainly can if you want, but let me just explain them first (or rather why I want a custom vs prebuilt view).
First of all, I'd like the flexibility to change the view as and when I get feedback from the users, as this is a new system and a complete change for the journalists. We have three levels of journalist: authors, sub-editors and editors. It's all fairly self-explanatory, with only the editors (and then only some) being able to publish content live. I've made three roles and two 'panels' for unpublished articles:
You're a star - thanks so much! For my needs that's perfect.
Thanks again for your work; I'll keep the feedback coming;)
Comment #14
rdeboerThanks for your support Andy! And for sharing how Revisioning works for you in what seems quite an elaborate real-life situation. Would you like to share the URL of your site with us?
Having read your explanation regarding your use of Views I now better appreciate its importance: I guess Views support is now even higher on the wish list of new features for Revisioning.
PS: discovered a minor bug in this latest feature, so have fixed it and created new release: 6.x-3.3.
Rik
Comment #15
Anonymous (not verified) commentedMany thanks to all for expressing the need for this, and to Rik for adding a solution so quickly. A have little problem in that after configuring my tabs to 'edit latest' and 'view latest', anonymous users now see the draft/pending version, not the current published version. Is anyone else experiencing this?
I should mention I am using Revisioning and Module Grants 3.4.
Comment #16
Anonymous (not verified) commentedWith regards to 'edit latest' versus 'edit current' I would even be inclined to have the option to prevent users editing the current revision, if there is already a later revision, to avoid forking. Looking at the new tab options, is this effectively what is happening? If you set it to edit latest, the user can no longer edit the current version?
Comment #17
Anonymous (not verified) commentedTo answer my own question, users can still edit the current revision through the Revisions tab. I would be inclined to restrict edit access entirely for the current revision or archived revisions, i.e. only the latest pending revision can be edited. Is this possible with any combination of existing permissions?
Comment #18
rdeboerRe #15... Will look into it. Anonymous users should not see the pending revisions UNLESS you have given them the "view revisions" permission (node section) or "view revisions of any <type> content" (revisioning section).
Re #17... No there are no permissions to restrict someone to editing only the latest revision. This is because to edit a revision one must also have the permission to edit the node (i.e. the current revision); the reverse is not true. "Edit current" and "Edit latest" are not permissions as such, just dynamically generated links pointing to the associated revision (subject to permissions).
Users DO get a big yellow warning at the top of the editing form when they're about to edit (fork) a revision other than the latest.
Comment #19
rdeboerRe #15... issue confirmed. Fixed and committed to repository (revisioning.module HEAD).
Comment #20
Anonymous (not verified) commentedThanks!
Comment #21
rdeboerRe #17....
In general content access in Drupal is based on permissions rather than restrictions, and these permissions work in an accumulative fashion. No permission will take away an access right granted by another.
So with that in mind an implementation of the feature you request would be something like an "edit only latest revision" permission, which I guess would then have to exist for all content types, i.e. a set of "edit only latest <content-type> revision" permissions that may be ticked while their well-known node module counterparts, i.e. "edit own|any <content-type> content", are not.
I can see conflicts with core behaviour though. Core tends to assume that the permission to edit a node (read: current revision) is a prerequisite for editing a revision.
Not sure how easy it will be to break this habit of core and whether we would want to?
Comment #22
eugenmayer commentedHello,
please have a look a the implementation of content_moderation regarding this issue. The current implementation you have chosen will fail with a lot of things (taxonomy, cck and so fort ).
it all about the
and the
method.
I just let you know, took me some time to debug this with all circumumstances (additional modules installed and so forth)
Comment #23
eugenmayer commentedComment #24
rdeboer@22:
I have looked at that code as well as mine and don't see what wouldn't work and why.
I'm using Revisioning with Taxonomy and there isn't a problem on my system.
All the code does it (re)load the latest revision of the node when a link of the form "node/%/view" or "node/%/edit" is clicked.
Please provide a reproduceable test-case, if you still feel there's an issue.
Marking this as fixed until proven otherwise.
Comment #25
eugenmayer commentedIts up to you, i dont need to prove this.
Comment #26
rdeboer@Eugen: very helpful ...
Comment #27
eugenmayer commented@Boer: Well sorry, you dont invest time to investigate and ask me to prove this? You simply mark it as "fixed until its proved". And then you are upset that this is not very helpful? Sorry, if you dont want to spent time on this, its surely up to you. But well, thats really not my fault.
I was just given you the hint to be helpful.