Publishing options seem to be copied correctly when using the "Save as a new node then edit" method, but are not copied correctly when using the "Pre-populate the node form fields" method. I'll try to track down the issue and post a patch if I can.

CommentFileSizeAuthor
#7 795394-7.patch1.97 KBpwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attheshow’s picture

The node is getting passed to the form correctly, but when the form is rendered using
return drupal_get_form($node->type .'_node_form', $node);
(This is at the very end of the clone_node_prepopulate function), the options are being ignored and the default settings for the content type are being taken into account.

attheshow’s picture

I've tracked it to the "node_object_prepare" function that is run on the form by core. It resets things to their default values for the content type. Trying to figure out the best plan of attack...

pwolanin’s picture

did you set the "Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?" setting?

superxain’s picture

Version: 6.x-1.0 » 6.x-1.3
Component: User interface » Code
Priority: Normal » Major

I am using 6.x-1.3 and the problem still is there. When I clone a node with "Promoted to front page" option unchecked, the clone page has the option checked. No matter the "Should the publishing options..." being checked or not.

gpk’s picture

Just hit this problem, also using 6.x-1.3.

The "Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?" checkboxes are all unchecked.

pwolanin’s picture

Issue summary: View changes

Ok, I can reproduce this - the problem seems to occur in the call to node_object_prepare($node) in function node_form()

In Drupal 7 core handles this better, so it doesn't stomp on the original values

pwolanin’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
1.97 KB

Here's a patch - not totally beautiful, but I don't see a better way

pwolanin’s picture

Status: Needs review » Fixed

committed

  • pwolanin committed d843cc8 on 6.x-1.x
    Issue #795394 by pwolanin: Fix for publishing options not copied When...

Status: Fixed » Closed (fixed)

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