Needs review
Project:
Workbench Moderation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2014 at 03:52 UTC
Updated:
9 Nov 2016 at 12:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eugene.ilyin commentedI prepared simple patch to solve this problem
Comment #2
das-peter commentedI think this should be fixed in the clone module itself as this exactly its core business.
The clone module know's when it's cloning (no need for hacky stuff like this
arg(2) == 'clone').And it should know what to clone and what not - again that's its core purpose.
Btw. if there's a "clone API" / a hook that would allow us to define non-clonable properties we could think about implementing it.
Comment #3
ladybug_3777 commentedI know this is marked as "won't fix" but I'm just curious if my issue is the same as this one. When I clone a node that is using Workbench Moderation I get the following errors/warnings in my log files:
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7818 of MYDRUPALROOT\includes\common.inc).Warning: Creating default object from empty value in workbench_moderation_store() (line 1787 of MYDRUPALROOT\sites\all\modules\contrib\workbench_moderation\workbench_moderation.module).Do you see this same error or are you seeing something different? Also this error is ONLY in the logs, it doesn't display on the screen and the item appears to be cloned just fine.
Comment #4
ladybug_3777 commentedFYI I opened up an issue on the Node Clone page: https://www.drupal.org/node/2501357
Comment #5
fengtan@das-peter How about implementing
hook_clone_node_alter()? See patch attached.Comment #6
fengtanComment #7
farse commentedI have noticed this issue updating from 1.4 to 3.0 due to the security updates. If a node is cloned it gets automatically saved as published even though in the moderation history is shows as saving to draft
Comment #8
farse commentedUsing hook_clone_node_alter() did not work for me. It only made the cloned version look as though it was a draft, but this draft was still being published. Looking at the $node vari in the hook, it is the same in the 1.4 and 3.0 versions, so I think the problem lies elsewhere in the module as the differences are found after the cloned node is saved.
Comment #9
farse commentedMeant to add my 3.0 version image along with comment #8
Comment #10
farse commentedalso for comment #8, the result of using the hook_clone_node_alter()
Comment #11
farse commentedThis is the code that worked for me for version 3.0, although it's not a 'fix' in the module itself.