Problem/Motivation

I added a new content type and added the existing field_site_section field to it for use by Workbench Access. The Settings tab for Workbench Access now shows that field as a choice for my content type and I selected it. But when I submitted the change the page redisplayed with my content type set to "No access control field". Not only that, but two other content types that had been set to "Site section (field_site_section)" now also display "No access control field". The top of the admin page gives warnings like "The Page content type does not have an access field configured." for each of the three content types. I cannot the admin page to apply the content type control fields that I select. I select them but when I submit the page it seems to have no effect.

I don't see any error message in the log.

I have found that I can get things to work if I edit the field usage within the content type, such as at admin/structure/types/manage/webform/fields/field_site_section, and select "Workbench Access control field". When I submit that the field then appears correctly on the workbench/access/settings page.

Proposed resolution

(description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch)

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

(new or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text)

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate)

Original report by [username]

// Text of original report here.
(for legacy issues whose initial post was not the issue summary)

Comments

agentrickard’s picture

Hm. What version of Drupal core are you using? Perhaps something has changed...

agentrickard’s picture

StatusFileSize
new79.99 KB

It is working in my tests. Here's a screen cap of the settings I have.

fredcy’s picture

I encountered this problem with Drupal 7.18. I'm currently on 7.20. I also find that when I try to create an instance of a content type enabled for Workbench Access the Site Section field has no available values to select from even though the Editorial Site Section vocabulary has many values.

agentrickard’s picture

Category: bug » support

What do the Editors / Roles and Sections tabs of the settings pages indicate? That form behavior suggests that your account isn't assigned to any editorial sections.

fredcy’s picture

You are right, no roles or users had been assigned to sections yet. I just made the administrator role an active editor for the top-level (most comprising) section and now when I create content I can select from all the possible terms. So, thank you, that solves the issue that I mentioned in #3 above.

However, I'm still having the problem that I reported in the OP, with the admin/config/workbench/access/settings page reverting to "No access control field" for each of the three content types (those where we assigned the field associated with workbench access).

agentrickard’s picture

I could not replicate that problem.

cheope’s picture

Same issue.
I correctly set up a field checking "Workbench Access control field" while managing fields, but I can't see "access control fields" on the module's configuration page.
I have another content type that successfully uses "Enforce Workbench Access control", but on another one I need to display the node's associated terms so I have to configure the access on the single field. Maybe I can have just one system to manage my sections over all my content types?
I use Drupal 7.22

[SOLVED] Yeah, I had to use just one way to configure access control over content types. Removing "Require a Workbench Access form element" did the trick. And by adding the term reference field to the first content type Workbench surprisingly kept all the old section associations. GREAT! Thanx.

nasia123’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Priority: Normal » Critical

I am still having this issue...
I have removed "Require a Workbench Access form element" , and I trying to have a custom taxonomy vocabulary , to 2 content types.
I go to the content types, and I enable "Workbench Access control field", but in the Settings in workbench access, after I select the access field and press the submit button, I get " The xxx content type does not have an access field configured."

Strange thing is that if I go the Content type then the "Require a Workbench Access form element" is not selected ...

It seems that workbench access settings "submit" button cancels all selections previously made on the content type.

But if you only enable the "Workbench Access control field" from the content type and not from the settings page of workbench access, all things work as expected.

I am using Drupal 7.22 an I also have content access module installed (using it on other content types, not the ones I am trying to set workbench access) and I also have Rules.

agentrickard’s picture

StatusFileSize
new51.82 KB

I just tested this again yesterday and it works fine.

What does the Workbench Access settings form "Access control fields" look like? If you disable "Require a Workbench Access form element", those must be configured, as shown in the attached.

It is possible that you lose settings when disabling the "Require a Workbench Access form element" -- that would actually make some sense.

nasia123’s picture

My settings look as the screenshot you provided , now that I have them enabled in the content type settings side. And it works ok.

But if I press the submit button on this page ("Access control fields"), this is when I loose them and I have to go to the content type setting again to enable them.

agentrickard’s picture

That's odd. I just repeated that behavior.

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new588 bytes

Sorry about that.

nasia123’s picture

Status: Needs review » Closed (fixed)

I works now.
Thanks for fixing this !

agentrickard’s picture

Category: support » bug
Status: Closed (fixed) » Reviewed & tested by the community

PLEASE do not close issues until the code is actually committed.

The proper status is "Reviewed and tested by the community."

agentrickard’s picture

Status: Reviewed & tested by the community » Needs work

And this doesn't work if multiple selections are allowed.

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new847 bytes

Revised patch. Still needs review.

nasia123’s picture

ok,
I did not have multiple selections so this option, did not cross my mind to check.

nasia123’s picture

Status: Needs review » Reviewed & tested by the community

I tried the patch with multiple selections allowed and it works

agentrickard’s picture

Thanks.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

   9e9638c..0f10bf4  7.x-1.x -> 7.x-1.x

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Adding more information about a workaround.