1. I have created/defined a new group role @ admin/config/group/roles
2. I get the following error when I try to edit the new group role:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal_7.12_group_1/includes/common.inc:2607) in drupal_send_headers() (line 1243 of /var/www/drupal_7.12_group_1/includes/bootstrap.inc).
and a page not found error. Also I have no way to delete the new group role.
I have installed and enabled the following modules:
og-7.x-2.x-dev
entityreference-7.x-1.x-dev
views_bulk_operations-7.x-3.x-dev
I do not have any other "og" related modules installed. Is anybody else having/seeing this problem?
Comment | File | Size | Author |
---|---|---|---|
#16 | 1463546-roles-ui-16.patch | 25.88 KB | itamar |
#11 | 1463546-roles-ui-11.patch | 24.88 KB | itamar |
#10 | OG group type roles | Site-Install.jpg | 29.69 KB | amitaibu |
#9 | 1463546-roles-ui-9.patch | 21.32 KB | itamar |
#6 | 1463546-roles-ui-6.patch | 12.9 KB | itamar |
Comments
Comment #1
amitaibuIs it happening on a clean Drupal installation?
Comment #2
marshallexcavating CreditAttribution: marshallexcavating commentedI just built a clean standard Drupal 7.12 installation on my localhost with just the basic modules need for "og". I have the same bug (cant edit or delete a role).
modules installed for this test:
drupal-7.12
entity-7.x-1.0-rc1
views_bulk_operations-7.x-3.x-dev
entityreference-7.x-1.x-dev
og-7.x-2.x-dev
ctools-7.x-1.0-rc1
views-7.x-3.3
The attached file sows the error I get when I try to edit a role.
Thanks
Comment #3
amitaibuOk, I see the problem, I'll be working on a fix.
Comment #4
head CreditAttribution: head commentedThe same problem.
drupal-7.12
Views 7.x-3.3
Views Bulk Operations 7.x-3.0-rc1+3-dev
Chaos tools 7.x-1.0-rc1+117-dev
Entity API 7.x-1.0-rc1+42-dev
Entity Reference 7.x-1.0-beta5+0-dev
Organic groups 7.x-2.0-alpha1+18-dev
Comment #5
itamar CreditAttribution: itamar commentedPatch fixes roles UI paths + moving access validation from og_ui_admin_roles() to access callbacks.
Comment #6
itamar CreditAttribution: itamar commentedCleaning up my previous patch.
Comment #7
marshallexcavating CreditAttribution: marshallexcavating commentedI attempted the patches to "og-7.x-2.x-dev" with "1463546-roles-ui-6.patch" and I got/failed:
"1 out of 6 hunks FAILED -- saving rejects to file og_ui/og_ui.module.rej"
I was able to manually change the 1 hunks and test; this leads me to believe that I should be trying to patch/test "Organic groups 7.x-2.0-alpha" or other? I am not sure if I am patching the intended og module base code please confirm?
Anyhow I tested the patch I out lined above and when I edit the role it takes me back to Home » Administration » Configuration with out any errors.
My test On a clean Drupal install not working.
Thanks
Comment #8
amitaibu@marshallexcavating,
I was able to apply properly. Make sure your 2.x branch is up-to-date (
git pull
) and usegit apply
to apply the patch.Comment #9
itamar CreditAttribution: itamar commentedEnhancing previous patch: Applying same URLs logic to roles and permissions editing + Further clean-ups.
Comment #10
amitaibu- Can't edit permissions of per-entity roles (404 error) on
group/node/[nid]/admin/permission/[rid]/edit
- Links should be hidden when editing single role/ single permissions (see image)
- Improve title callback, to make it clear on which context we are
Comment #11
itamar CreditAttribution: itamar commentedFixing issues according to comment #10 + Updating permissions test with the new URLs.
Comment #12
amitaibuComment #13
marshallexcavating CreditAttribution: marshallexcavating commentedApplied the patch "1463546-roles-ui-11.patch" to branch "Organic groups 7.x-2.0-alpha1+19-dev (2012-Mar-04)" on a clean install and roles are working as expected.
My tests indicate it is fixed.
One side note: on a new clean install before any content type is set to a group and you try to edit a role you can't (you get looped back to Home » Administration » Configuration). This is not a problem as soon as you set a content type to og the first time.
Working og modules for this test:
Drupal core 7.12
Chaos tool suite (ctools) 7.x-1.0-rc1
Entity reference 7.x-1.0-beta5+0-dev (2012-Feb-26)
Organic groups 7.x-2.0-alpha1+19-dev (2012-Mar-04)
Views Bulk Operations (VBO) 7.x-3.0-rc1+3-dev (2012-Feb-22)
Views 7.x-3.3
Thank you
Comment #14
amitaibuGetting very close
Maybe better: "Get group type and bundle from role."
Helper function to get role names.
I think it's a very custom function, lets prefix it with _ (i.e. function _og_ui...)
At this point we shouldn't be getting wrong data, so we don't need to check again of the group was properly loaded.
No need to document these two variables.
Missing space in start of line.
Same as one of the previous comments.
Please document why we pass an empty string.
Fox consistency, please move the "title callback" above "title arguments".
bundle => per-bundle
you can short it by
return $role;
Add docs -- // Role doesn't exist, or doesn't belong to the group.
Maybe better: Return the title for editing role or permissions, based on context.
t('Global')
XSS... need to
check_plain($role->name);
better use !empty() instead of array_key_exists().
Again, need to check_plain() the $entity_info[...
Comment #15
gmclelland CreditAttribution: gmclelland commentedJust tested patch in #11. It fixes the problem.
Comment #16
itamar CreditAttribution: itamar commentedAmending patch according to comment #14 + Fixing wrong title when editing bundle's role.
Comment #17
amitaibuCommitted, thanks.