[error] [client 10.191.96.42] PHP Fatal error: require_once(): Failed opening required '/var/aegir/platforms/wcg-d7-14/sites/all/modules/workbench_access/modules/i18n_taxonomy.pages.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/aegir/platforms/wcg-d7-14/includes/menu.inc on line 514, referer: http://dev.website.com/node/add/wcg-speech
I have a form with two taxonomy fields: one uses the select list widget and is also the access field for workbench_access, the other is for a tagging vocab and uses the core taxonomy autocomplete widget.
The autocomplete widget tries to include i18n_taxonomy.pages.inc from sites/all/modules/workbench_access/modules instead of from i18n. I'm on a deadline so I've simply symlinked the file in from i18n.
Workbench_access should not be changing autocomplete paths for taxonomy fields that are not associated with it. The override of taxonomy/autocomplete appears to be happening in workbench_access_menu_alter() (workbench_access.module:131).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | i18n_taxonomy_autocomplete.patch | 1.04 KB | jose reyero |
Comments
Comment #1
agentrickardWe change the autocomplete so we can filter the results properly.
But I see the problem -- workbench_access_menu_alter() applies to all autocomplete callbacks, regardless of the setting.
This bug is actually in i18n, which incorrectly alters the file name but not the file path of the autocomplete. i18n_taxonomy needs the following code in i18n_taxonomy_menu_alter():
However, the two modules may need to coordinate on how to enable both to function properly. At the moment, i18n_taxonomy will not properly restrict the results of the query based on user access rules.
Comment #2
agentrickardNote that given Drupal's autocomplete architecture, there is no way to *not* change the autocomplete callback for all widgets, unless perhaps we sniff the #autocomplete path in a form_alter.
I would advise fixing the menu_alter in i18n, and opening a new issue where we figure out if/how both modules can intervene.
If that fails, we can open a new issue to change the way #autocomplete is applied by Workbench Access.
Comment #3
agentrickardAlso note that the use of 'module' by i18n is (apparently) an undocumented feature of hook_menu().
Comment #4
jose reyero commentedThis patch should fix the issue, as suggested by @agentrickard
(Right, 'module' is not documented for hook_menu so we should be using 'file path' instead)
About
It does, since it adds the 'term access' tag to the query.
Comment #5
jose reyero commentedCommitted.
Comment #6.0
(not verified) commentedAdd the actual error message.