When trying to create a new product type for the Commerce module, I get dozens of the same errors after the final submit for adding any new fields for any new types.
Notice: Undefined variable: mod_name in permission_select_theme_user_admin_perm() (line 63 of C:\xampp\htdocs\commons73dev\profiles\commons\modules\contrib\permission_select\permission_select.module).
I should note that the perm select version is the re-rolled and patched version at #25 from http://drupal.org/node/914580
Also... Permissions filter is installed and working in parallel, and I've set the default administrator role as well - at admin/config/people/accounts - to get permissions ticked automagically. The last bit is where it's probably hanging up.
Despite the notice/error, the entries in the permissions list are created - but - they don't show as a ticked item for the selected admin user.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | issue-1732910-undefined-mode_name-10.patch | 795 bytes | segi |
| #8 | Undefined-variable-mod_name-1732910-8.patch | 666 bytes | intrafusion |
Comments
Comment #1
HumanTex commentedAs a quick update... I've been working with other content types and modifying or adding field data, I'm getting the same notice messages - but as before - the edit/add succeeds with no ill affects that I've seen so far. Obviously the errors aren't confined to just Commerce content fields, or only when creating new content types.
Comment #2
Anonymous (not verified) commentedsame problem for me. Seems like as if a module had been deactivated and a permission for this module still present and causing this kind of notices.
I had this with RedHen module but doesn't seem to be a redhen question.
Comment #3
anybodyConfirming this issue.
Comment #4
pog21 commentedI had a look at
permission_select.modulearound line 62 and I noticed that mod_name is only assigned if $key is numeric. Moving the assignment to just before the condition seems to fix it. So it now looks something like this:Please note that I don't know if this breaks anything else, as I haven't tested it much!
Comment #5
skribbz14 commentedThank you, pog21, comment #4 fixed this error for me. Has anyone else tried this and has anyone found any issues with this solution?
Comment #6
anybodyThe solution works fine :)
Comment #7
Katrina B commentedBy the way, this problem occurs with version 7.x-1.2 as well.
Comment #8
intrafusionPatch attached to fix issue, can we get this tested and applied to the module?
Comment #9
dsuess commentedis this patch going to be addressed anytime soon or ever?? I don't like having custom patches running on live customer sites.
Current Version: 7.x-1.2
Comment #10
segi commentedI checked the patch and I found one strange thing, why is necessary to translate the html ID name? I know this issue does not connect closely to issue, but we touch the same row, so I thought I fix issue in the same time.
Comment #11
alexgreyhead commentedThe patch in #8 worked for me - thanks Intrafusion.