I saw a few other tickets that might be related to this indirectly, including VBO for Workbench Access, but it wasn't clear to me that any addressed this issue directly in the way I was hoping to find. Essentially, I am only using Workbench Moderation. We've updated over a thousand nodes, and at this point want to essentially bypass the moderation workflow, and just publish everything outright. Using standard VBO stuff, I was able to publish all these nodes; however, they are ALSO still holding onto their Draft states. I really don't want to have to go through a thousand nodes, mark them "Needs Review", then go through them again and promote them to "Published". I also don't want to completely uninstall Workbench Moderation, or delete the states (seems like at least disabling them might be useful for certain projects/sprints?). Is this something that WM can already do, and just needs a settings somewhere to get it to work right?

Thanks!

Comments

Cyclodex’s picture

I have the same issue, the nodes are published but workbench moderation doesn't mark them accordingly.
edited: uups I was completely wrong regarding the VBO ticket, we are in Workbench Moderation, so it looks like this ticket is in the correct place , sorry :D

What do you think ?

David_Rothstein’s picture

I think this is basically the same problem being discussed at #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published), so I'm marking this as a duplicate. Feel free to reopen if you disagree.

David_Rothstein’s picture

Status: Active » Closed (duplicate)

Er... this time I actually am marking it as a duplicate.

mausolos’s picture

If the issue is whether or not VBO has access to bulk actions that allow you to set the status of multiple nodes at once to whatever you want, then no, this does not appear to be a duplicate. There are definitely use cases for expanding VBO/Moderation besides being able to publish correctly. Can we re-focus this ticket on general VBO features, or should I open a new one to track that? (If you agree, I'll let you set it to active, otherwise I'll just make a new ticket in a week or two).

Thanks!

David_Rothstein’s picture

Title: VBO » Allow VBO to change Workbench Moderation states
Status: Closed (duplicate) » Active

OK, that seems reasonable to me. Retitling accordingly.

mradcliffe’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

A couple of comments:

- Force transition should have an #access property.
- I think setting moderation state for a current, published revision leads to history corruption (see #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published)), and I don't think it should be allowed at all. Setting moderation state should never allow workbench history to become corrupt.
- Add validation based on transition state access of the user or the force transition value or only show states the user has access action to transition to.

dsayswhat’s picture

@mradcliffe:

As to whether vbo should allow you to corrupt revision history, I think you're right, it shouldn't happen. But I don't think that's a function of VBO, nor is it limited to just VBO, as other operations like scheduled publishing aren't perfectly supported yet either.

Ideally, you should be able to transition anything you have access to, to any state you're permitted to handle...and then Workbench Moderation should do the right thing to avoid corruption.

In my mind, that's an issue that has to be handled over on #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published) and then everyone can benefit - I think you're on the right track with access control and validation that takes the user's role/moderation rights into account.

acbramley’s picture

I'm also after this feature and it appears that neither the core publish action or the workbench set state action work as you'd expect. They both corrupt the history, and while using the patch from #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published) the (un)publish action does nothing at all. However with the patch the set moderation state seems to correctly publish a node when setting the state to published on a Draft piece of content but does not unpublish the node when setting the state to draft from published.

acbramley’s picture

I just thought of a work around and initial testing shows it works quite well. I made a reaction Rule that reacts after updating existing content that says if the status is published and the workbench moderation state is not published, force the transition. Don't know if there's any bad implications from this but it seems to work.

acbramley’s picture

Scrap that, the rules configuration fix messes up saving drafts completely...back to the drawing board...thinking of just writing a custom action

mausolos’s picture

I think we just have to wait on this until #1436260 is worked out, like dsayswhat said. Then, this should be a comparatively easy problem to solve.

Sebbon’s picture

Issue summary: View changes

It seems #1436260 has been resolved. Hope this is now a comparatively easy problem to solve... I've had the problem when using VBO to unpublish some nodes. They get unpublished fine, but workbench status still shows them as published workbench status does not get updated.

Weird thing is when checking the 'moderation' tab the date for the moderation revision is the bulk update action date, so it does update that. But Moderation action still shows "From Published --> Published " on the old published moderation date.

Jody Lynn’s picture

I just set up VBO for workbench moderation without issue. I think some posters here are just confused about how workbench moderation works.

With workbench moderation you are changing the status of a revision. The view you make with VBO should be a view of revisions and the VBO action should be to moderate the revision.

You cannot use core's publish/unpublish node operations and expect workbench moderation to figure out what you intend to be doing. The "Published" status in Workbench Moderation is not the same thing as core publish status. The latter is the status of the node, while the former is the status of a revision.

Sebbon in comment 12 for example is saying that when he used core unpublish action that it didn't change the moderation status as expected. Which moderation status did you think it would change it to? Draft? Needs Review? Some custom status you added? If you are unpublishing it in a way that gives you no way to set what the new status should be, how should it know?

iStryker’s picture

@Jody "How should it know?" There is a default state variable. When it unpublishes it should be set to that. Same goes for publish, there is a default state variable for it as well.

If I remeber correctly, there is two functions that help you out too. One for unpublish and one for publish.

washburn’s picture

My path to success with Drupal 7 - Views Bulk Operations - Workbench Moderation - (no patches)
Background - I had imported over 700 content pages which came in as published (Drupal) but draft (moderation) - I could not get VBO to put them into Published (moderation) as experienced by the entries above and other spots on the web.

My eventual path to success
1. In Views - Filtered the content type that I wanted to find all that were in draft (moderation) state
2. Used VBO to unpublish (Drupal) all of them
3. Changed Structure => Content Types => mycontenttype - shut off moderation of revisions and shut off revisions - set default to published
4. Once again used views to filter all of the draft (moderation) versions of my target content type.
5. Used VBO to set moderation state to published - I had to do this a number of times because it would do a lot of them but not all of them at a time (sometimes it appeared to do about half of them) - continued until they were all in published state (both Drupal and moderation)
6. Changed Structure => Content Types => mycontenttype - allow revisions and moderation of revisions

Declared a victory and went to lunch.

jibran’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue tags: +VDC

Now that moderation state is a base field on node and block content we can do it easily do that in 8.x version. Is it ok @Crell to move this to D8 first?

Crell’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Issue tags: -VDC

All that would be needed for D8, I think, is #2627780: Add an action plugin to transition between states. Since that's already filed let's leave this issue for D7. I'm not working on the D7 version but let's leave it for those who are.