If, in the definition for your export UI plugin, you use a menu path longer than a single item, the menu paths are generated with incorrect 'page argument' keys.
e.g. this works:
...
// Define the menu item.
'menu' => array(
'menu item' => 'profiles',
'menu title' => 'Source profiles',
'menu description' => 'Administer source profiles.',
),
...
but this does not:
...
// Define the menu item.
'menu' => array(
'menu item' => 'source/profiles',
'menu title' => 'Source profiles',
'menu description' => 'Administer source profiles.',
),
...
This is caused by ctools_export_ui_process() assuming that the path length is 2 elements (the menu item + the action) when in fact it can be longer.
Patch coming...
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1922064-fix-export-ui-paths.patch | 6.17 KB | xtfer |
Comments
Comment #1
xtfer commentedThis patch sets the 'page arguments' and 'access arguments' argument position key dynamically by counting the number of path items provided in the 'menu item' key on the plugin definition, rather than assuming it is always 1 path item only.
Comment #2
mcrittenden commentedWouldn't you just use the "menu prefix" array key to make that work instead of making "menu item" have more than one item?
Comment #2.0
mcrittenden commentedFixed second example
Comment #4
chris matthews commentedThe 6 year old patch applied cleanly to the latest ctools 7.x-1.x-dev, and if applicable still needs to be reviewed and tested by the community.
Comment #5
japerryDrupal 7 is no longer supported, closing.