I can't access Event administrative settings on 6.x-2.x-dev. On the path 'admin/settings/event' I get:
Fatal error: Unsupported operand types in /home/jirux/test-webspace/nat5-puv/modules/system/system.module on line 626
If I type the paths of children manually (for example 'admin/settings/event/timezone'), the pages are accessible just fine.
I don't know what's the deal with the hook_menu() implementation; it seems like attempting a page in the 'admin'-path overview style (?), but for some reason, the item 'admin/settings/event' is missing from {menu_links} table entirely, giving the said error. I don't know, how to get *that* to work, but I quite prefer to have the administrative settings shown as local tasks (i.e. tabs), just like (almost) all other modules do.
So I created a patch, to turn the administrative pages menu-definitions into normal tabs (also removing redundant callback definitions, where default/inherited do just fine). This simplifies the hook_menu() code a bit, and works fine for me.
(Also note that event module might need to be splitted into event.admin.inc, event.pages.inc etc. - but that's definitely out of scope for this issue.)
| Comment | File | Size | Author |
|---|---|---|---|
| event-admin.patch | 1.72 KB | JirkaRybka |
Comments
Comment #1
JirkaRybka commentedMy apologies for false alarm.
It turned out, that this is yet another problem with the 5.x->6.x menu system upgrade (which is very annoying all the time BTW). My 5.x link to admin/settings/event - for some quite unknown reason - appears as "customized", and that's what broke the new version of Event so badly. After doing 'reset' on the old link from the menu administration page (which is a nightmare too, BTW, taking some 3 minutes to load), that stale link became just a harmless piece of undeletable garbage in my administration menu, no more blocking new Event version. [menu upgrade sucks]
So this is no more critical, demoting. But still, this might need to be documented somewhere (i.e. UPGRADING.txt notice to reset old links from menu admin page).
However, I still quite dislike the way Event now does it's administrative menu items. I see that the whole main admin page have usually per-module links (apart from reports and a few other major/frequent entries), under more general categories (never per-module, as far as I've seen). Settings of the "choose-and-forget" type (as seen in Event) are somewhere even grouped together, like 'URL aliases' (path module) and Pathauto sharing the same link. Having separate links for a contrib module settings, which are in fact just subparts of one split-up form, is unusual. And having a separate top-level category for that - I'm afraid that this falls into "unheard of" realm, or inconsistent at least. I would definitely support to change that into usual tabs, as seen in other modules. For this purpose, the patch still applies, so leaving at "needs review".
Comment #2
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.