Download & Extend

not keeping defaults: for other publishing options

Project:Publish Content
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:malaussene
Status:closed (fixed)

Issue Summary

Other publishing options like: I use the promote to front page and it is by default on but with this module I can not set it.

Comments

#1

Assigned to:Anonymous» malaussene
Status:active» postponed (maintainer needs more info)

Hi marcus7777,

I made a quick test by using an authenticated user who can 'administer nodes',
and was able to promote to a node to the frontpage.

Could you give more details?
- user permissions
- step to reproduce the issue

thanks

#2

Version:6.x-1.1-beta3» 6.x-1.1

I have this same issue..
When a default value is set for the workflow settings of a content type, those settings are not maintained when a user with publish permission publishes the node. For example, the Story content type on my site has the "Promote to front page" option selected under the defaults, so when published, that node should, by default, display on the front page. However, that setting does not stick. A user with administer nodes permissions must edit that node and click the checkbox for "promote to front page" on that node.

#3

quick idea:
do not "unset" the following lines of code in hook_form_alter in file publishcontent.module:

    unset($form['options']['promote']);
    unset($form['options']['sticky']);
    unset($form['options']['revision']);

instead, pass those (along with whatever default value each of those are carrying) as "hidden" form elements (sorry, no time to code the workaround for now). this approach should resolve the issue for those who don't care about the note below.

WARNING:
if this route is taken, someone [ not your everyday Joe though ;-) ], can submit this form with changed default values from the clientside and it will be accepted on the server. meaning: the user with publish/unpublish ONLY perms can now change the "promote" & "sticky" & "revision" item values as well, even though s\he doesn't have the explicit permission to do so.

feel free to correct any wrong assumptions I may have made ... cheers

#4

Version:6.x-1.1» 6.x-1.x-dev
Status:postponed (maintainer needs more info)» needs review

buzzman, you have the right idea.
the better solution is to set $form['options']['promote']['#access'] = FALSE;.
if this patch works for y'all i'll get it in right away.

AttachmentSize
454660-retain-defaults.patch 1.28 KB

#5

sorry, a tweak based on #750634: Incompatibility with Publish Content Module

use this one instead.

AttachmentSize
454660-retain-defaults.patch 1.6 KB

#6

Agree with #2. In our case, we need there to be an audit trail that records changes to the node, and we have create new revision checked by default for this purpose. No new revision means Publish/Unpublish operations are not captured.

#7

Status:needs review» fixed

this is into dev, along with respect for "revision" defaults to address david's concerns in comment #6 - will roll a new release soon.

#8

Status:fixed» closed (fixed)

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

nobody click here