When using the Menu translation module that is included in the i18n package, primary links cannot be set to active by Context. This is because i18nmenu_preprocess_page() replaces primary links with its own, and is always runs after Context's preprocess function. I tried changing the module weights to affect the order in which the functions are run, but the order remains unchanged. Does anyone know how to get context_preprocess_page() to run last?
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | i18n-DRUPAL-6--1_i18nmenu_preprocess_page_first.patch | 1.38 KB | dboulet |
Comments
Comment #1
xalexas commentedSame thing with i18n Block translation. All blocks defined in context reactions disappears after i18n Block translation is enabled.
Comment #2
dboulet commented@xalexas, that is a slightly different issue—see #402150: Conflict with i18n block translation: Context defined blocks don't show up.
Comment #3
xalexas commentedIt seems it's resolved with i18n 6.1.4
Comment #4
fletchgqc commentedI'm running i8n 6.1.4 and I installed context and created a context to set a primary links menu item active and it didn't work.
Then I disabled all the i18n modules and the context condition worked nicely.
So I think the problem of a conflict with i18n somewhere still exists.
Comment #5
xalexas commentedAre you using context 6.x-3.0-beta4? What theme are you using?
I have i8n 6.1.4 and Context 6.x-3.0-beta4 with ZEN sub theme and don't have problem anymore. Try to clear cache if you didn't and run update.php.
Everything worked for me after upgrading to i8n 6.1.4.
Comment #6
fletchgqc commentedYes I'm using that version; custom theme from scratch but I checked the HTML and the data wasn't in there. I did what you said and it still didn't work for me. I'm going to leave this issue here because I've figured out I can get the simple functionality I need from the menu trails module. Good luck to the next person.
Comment #7
robertgarrigos commentedI'm having this issue with i18n 6.1.4, context 6.x-3.0-beta4 and garland theme. Disabling i18n.menu module "solves" the problem. :-(
Comment #8
kdebaas commentedI can confirm this incompatibilty. Working with Context 3.0-beta5 and i18n 1.5. Flushing caches didn't help.
Comment #9
danny_joris commentedEdit: At first I thought I had the same issue, but I disabled all i18n modules and the issue remained. Posted new issue here: #842250: None of my blocks are showing + blocks stuck in footer region
Comment #10
dboulet commentedI found the following code in the JQuery Update module, I think that we could implement something similar to solve this problem:
Comment #11
scott859 commentedsubscribing
Comment #12
dboulet commentedCome to think of it, I think that it should probably be up to the i18nmenu module to make sure that its preprocess function runs first. Any other modules making changes to the primary links will have the same incompatibility as Context.
I'll look into this.
Comment #13
dboulet commentedThis fixes the incompatibility with Context module.
Comment #14
gaia commentedapplyed this patch and the context module does its job.
but there is another problem now. i have two languages installed and the primary links are all displayed in both languages.
any hints how to solve this?
thanks.
Comment #15
shadysamir commentedSubscribe
Comment #16
mmartinov commentedI've just applied the patch and it fixes the issue. I've got three languages and for me there are no side effects such as the mentioned by gaia above.
Comment #17
shadysamir commentedThe patch in #13 did not fix my Context problem
Comment #18
lord_of_freaks commented#13 works for me ... thx a lot
Comment #19
jose reyero commentedJust let's make this clear: i18n blocks are not compatible with context module because both modules will clash on multiple places.
(And that is not expected to change for Drupal 6)
Comment #20
shadysamir commented@Jose You mean i18n menu?
Comment #21
EndyBoooj commented@gaia, I had the same problem, but I noticed that not all our items were displayed. only menu items created by modules, not directly from a node. For example, one menu item, linked to a page was hidden, but another item, created by facetted search, was indeed displayed in our menu.
I solved this with a little tweek, copied from the way context alters the theme_registry. I'm not completely sure this is all written the Drupal way but we had to do so, to reach our deadline.
Comment #22
lmeurs commentedFor Drupal 7 I used the code from post #21, but changed the module's name from
i18nmenu(D6) toi18n_menu.Post #21 also uses
i18nmenuas a hook, it's better to use your own theme's or module's name.