Current Features-7.x-2.x-dev version fails to export menu link language information if it exists.
1. i18n_menu_query_features_menu_link_alter()
function in i18n_menu
module tries to alter queries with features_menu_link
tag in order to add language related fields to menu links:
/**
* Implements hook_query_TAG_alter() for features_menu_links.
* Add needed fields to properly serialize localization information.
*/
function i18n_menu_query_features_menu_link_alter($query) {
$query->fields('menu_links', array('language', 'customized'));
}
This alter function exists because it is presumed that features_menu_link_load()
function in Features module attaches features_menu_link
tag to the query that loads the menu link so that langauge related fields can be added to the exported code.
2. features_menu_link_load()
function indeed attached features_menu_link
tag to menu link loading query but with commit afa9133
this functionality is lost no apparent reason (see the diff, search for "addTag('features_menu_link')").
3. Solution: attach the tag back to the menu link loading query.
Comment | File | Size | Author |
---|---|---|---|
#1 | features_menu_link_query_alter_tag_patch.2216225.diff | 608 bytes | maijs |
Comments
Comment #1
maijs CreditAttribution: maijs commentedA patch against HEAD is attached.
Comment #2
FreekVR CreditAttribution: FreekVR commentedI can confirm that this issue exists. This patch also fixes said issue. I am hestitant to set this to RTBC however as I am unsure whether the query tag was intentionally removed?
Comment #3
maijs CreditAttribution: maijs commentedCommit message indeed does not state that it also contains a patch from issue #927566. It seems to me that the patch that removed
->addTag('features_menu_link')
statement did so unintentionally as nothing in the changed code in the patch suggests thataddTag()
was in conflict with the proposed logic. Besides,addTag()
simply provides a way for other modules to alter the query.Comment #4
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedI confirm the patch is working, but this issue is a duplicate of #1931512: Supporting extra menu_links attributes, which have already been committed.