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)
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 1921708-wa-settings-save-16.patch | 847 bytes | agentrickard |
| #12 | 1921708-wa-settings-save.patch | 588 bytes | agentrickard |
| #9 | Screen Shot 2013-08-22 at 4.36.18 PM.png | 51.82 KB | agentrickard |
| #3 | Workbench Access _ Illinois Mathematics and Science Academy®.pdf | 148.77 KB | fredcy |
| #3 | Screen Shot 2013-02-25 at 1.25.06 PM.png | 53.31 KB | fredcy |
Comments
Comment #1
agentrickardHm. What version of Drupal core are you using? Perhaps something has changed...
Comment #2
agentrickardIt is working in my tests. Here's a screen cap of the settings I have.
Comment #3
fredcy commentedI 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.
Comment #4
agentrickardWhat 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.
Comment #5
fredcy commentedYou 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).
Comment #6
agentrickardI could not replicate that problem.
Comment #7
cheope commentedSame 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.
Comment #8
nasia123 commentedI 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.
Comment #9
agentrickardI 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.
Comment #10
nasia123 commentedMy 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.
Comment #11
agentrickardThat's odd. I just repeated that behavior.
Comment #12
agentrickardSorry about that.
Comment #13
nasia123 commentedI works now.
Thanks for fixing this !
Comment #14
agentrickardPLEASE do not close issues until the code is actually committed.
The proper status is "Reviewed and tested by the community."
Comment #15
agentrickardAnd this doesn't work if multiple selections are allowed.
Comment #16
agentrickardRevised patch. Still needs review.
Comment #17
nasia123 commentedok,
I did not have multiple selections so this option, did not cross my mind to check.
Comment #18
nasia123 commentedI tried the patch with multiple selections allowed and it works
Comment #19
agentrickardThanks.
Comment #20
agentrickardCommitted.
Comment #21.0
(not verified) commentedAdding more information about a workaround.