Can create new modules okay, but on redirection to edit forms, or on subsequent attempts to access the forms manually, I get an "access denied". This appears to be due to a couple of "access arguments" missing from module_builder_menu().
Attached patch seems to fix it. This function (and much else besides) seems to be extensively rewritten in HEAD, so I don't know if I should really be posting this at all. Apologies in advance to any irritated maintainers.
| Comment | File | Size | Author |
|---|---|---|---|
| module_builder-omitted_access_arguments.patch | 1011 bytes | Matthew Davidson |
Comments
Comment #1
agerson commentedSame problem here
Comment #2
Rosamunda commentedSame problem. Sadly the patch didn´t worked...
Comment #3
ardee-1 commentedSame problem here, too.
Comment #4
BrightLoudNoise commentedComment #5
lyricnz commentedSame problem here, I fixed it the same way as the patch describes (remember to empty cache after updating hook_menu)
Comment #6
dman commentedThanks for the patch. Worked for me.
I wasn't sure where to start with the menu, as I'm trying this module in order to START learning the new hook_menu() ;-)
I applied the change by hand. Flushing the menu cache wasn't good enough (it seemed) so I disabled & re-enabled the module. All good so far, it seems.
+1 CRITICAL to this fix.
Todays fresh Drupal 6.4-dev here FWIW. Could have been a change to the menu permissions at some point. I thought they were going to inheirit :-/
.dan.
Comment #7
lyricnz commentedThis was changed in Drupal 6.2. See release notes - http://drupal.org/node/244637 "Note for Module developers"
Comment #8
dman commentedThanks for the link. This explains it perfectly.
Just something else to remember :-}
However the rest of the module builder didn't help me at all when it was working. I was hoping it would provide a bunch of hook boilerplate for me to work from. I'd call this module a bit weak. Or a bit ambitious, It's a heck of a challenge to build a useful thing like this. :-/
Comment #9
webchickSo who wants CVS access to commit this patch? dman?
Comment #10
webchickAnd yes, this module sadly got half-baked cos I ended up learning everything I needed to know in the process of building it and then no longer needed this module. ;)
I have some time blocked out at the code sprint in Szeged to pimp it out with some folks though. :) If you have suggestions, toss 'em in the queue!
Comment #11
dman commentedHm. My approach to it would also be as a learning experience :-B
But by the time I'd worked through that, I'd no longer need the module either. I can see how that would happen.
My best-case version would be a wizard that presented a few dozen checkboxes listing all known module hooks that pumped out boilerplate functions with cool documentation.
The boilerplate should include some nice
switchblocks wherever appropriate, but beyond that is hard to predict/automate.I'm not sure how the current menu wizard should be extended. It didn't seem to go for me at all when I tried, but it's got its use.
I'm not keen on putting time into the project however, it's not really me.
Comment #12
joachim commented> My best-case version would be a wizard that presented a few dozen checkboxes listing all known module hooks that pumped out boilerplate functions with cool documentation.
That's what version 5 does!
It looks like none of that stuff is in 6 -- is that because it's yet to be ported, or was the maintainers' plan to go for a different approach?
Anyway -- patch applied and committed, thanks :)
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.