Closed (fixed)
Project:
Internationalization
Version:
7.x-1.x-dev
Component:
Compatibility
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 May 2009 at 15:41 UTC
Updated:
30 Jan 2012 at 00:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jose reyero commentedI'll be following on the Context module issue.
Comment #2
makara commentedHi Jose,
I don't see the needs of overriding "theme_blocks()" function. A "hook_preprocess_block()" could be enough.
If you agree this, I can build the patch.
Makara
Comment #3
paranojik commentedSubscribing.
Comment #4
Ryan Palmer commentedOne solution would be to get rid of i18n block entirely, and use a single context per language instead...
#632322: Context language condition support
Comment #5
kdebaas commentedSee also #644044: Activating module Block Translation breaks sidebar rendering in the Zen issue queue.
Comment #6
makara commentedI built the patch, based on cvs DRUPAL-6--1.
I didn't change the code that does the translation, but just moved it from hook_theme_registry_alter() into hook_preprocess_block(). This solves the conflict.
Please review.
Comment #7
makara commentedComment #8
Kameleonten commentedThanks, your patch works great!
Comment #9
kdebaas commentedPatch works:
Updated i18n to dev version. Applied patch. Confirmed that theme_blocks is rendered correctly. Menus and blocks are still ok.
Thanks!
Comment #10
tcibah commentedUpdated i18n to dev version. Applied patch. Got this error:
Fatal error: Uncaught exception 'ReflectionException' with message 'Function i18nblocks_theme_blocks() does not exist' in /home/khaleej4/public_html/jobs/sites/all/modules/devel/devel_themer.module:389 Stack trace: #0 /home/khaleej4/public_html/jobs/sites/all/modules/devel/devel_themer.module(389): ReflectionFunction->__construct('i18nblocks_them...') #1 [internal function]: devel_themer_theme_twin('blocks', 'sidebar_first') #2 /home/khaleej4/public_html/jobs/sites/all/modules/devel/devel_themer.module(230): call_user_func_array('devel_themer_th...', Array) #3 [internal function]: devel_themer_catch_function('sidebar_first') #4 /home/khaleej4/public_html/jobs/includes/theme.inc(617): call_user_func_array('devel_themer_ca...', Array) #5 /home/khaleej4/public_html/jobs/includes/theme.inc(1774): theme('blocks', 'sidebar_first') #6 [internal function]: template_preprocess_page(Array, 'page') #7 /home/khaleej4/public_html/jobs/sites/all/modules/devel/devel_themer.module(451): call_user_func_array('template_prepro...', Array) # in /home/khaleej4/public_html/jobs/sites/all/modules/devel/devel_themer.module on line 389
Error disappears after disabling Theme developer 6.x-1.18 (D 6.14).
Also, menus and blocks are ok.
Comment #11
kdebaas commentedWell, obviously 'Function i18nblocks_theme_blocks() does not exist', since that is what this patch substituted for 'function i18nblocks_preprocess_block(&$variables)'. It looks like the error might be due to some leftover cache. Could you confirm whether your problem persists, after emptying caches?
I enabled Theme developer, and received no errors.
Comment #12
Garrett Albright commentedSuccess for me running that patch against the 6.x-1.2 release - blocks are now back in their place on my subtheme based on the Zen 6.x-2.0 beta 1 release. Thank you very much, makara!
Comment #13
nonom commentedSuccess for me. Great!
Comment #14
marvil07 commentedsubscribing
Comment #15
svendecabooterThe patch in #6 applies perfectly, and is probably the way this should have been implemented in the first place.
This fixes the conflict this module has with the Context module beautifully.
Comment #16
hipfox commented#6 patched.
Comment #17
perandre commentedWill test soon, great work.
Comment #18
sullix commentedThanks !
Comment #19
Anonymous (not verified) commentedWorks here, too. I suggest adding this to CVS. Thank you!
Comment #20
James Andres commentedWorks for me, +1 to commit this.
Comment #21
johnalbinI'd really like Zen 6.x-2.x to be compatible with i18n, but it won't be until this patch is committed. It has been RTBC for 2 months now.
Comment #22
mnzaki commentedWorks perfectly for me.
+1
Comment #23
hefox commentedThe check plain is causing html (a link) in the block title generated via menu_block module to become all not treated as html.
However, there's a comment "// Check plain here to allow module generated titles to keep any markup." that suggestions the html should be preserved by the check_plain, which doesn't quite make sense to me, so I'm thinking I'm not quite getting something.
edit: It appears to be a conflict between panels/ctools. Likely the check_plain is being run twice.
Comment #24
hefox commented(Looked over the patch and realized the check_plain was a pre-existing condition, so moving back to RTBC, sorry :) ).
Comment #25
Jeff Burnz commentedAdding my review, patch applied cleanly to i18n dev (2010-Jan-03) and works as expected, thank-you very much makara!
Comment #26
Anonymous (not verified) commentedPatch fails against current dev version (march 04):
patching file i18nblocks.module
Hunk #1 FAILED at 287.
1 out of 1 hunk FAILED -- saving rejects to file i18nblocks.module.rej
Comment #27
jose reyero commentedThe patch looks good, though it needs updating for latest i18n/i18nstrings changes (6.x-1.3 security release).
Also the language condition is now supported by context which is a possible workaround, see #4
Comment #28
johnalbinRe-rolled.
Since this breaks themes, I would still consider this issue a bug. But let's not let pedantic categorization get in the way of committing it. :-)
Comment #29
kdebaas commentedNew patch applies cleanly to updated i18n. (I had to empty caches to see the result though)
Thanks. Let's get this committed.
Comment #30
jose reyero commentedGreat!
Committed. Thanks.
Comment #31
Anonymous (not verified) commentedcool, thanks everyone!
Comment #33
gagarine commentedI reopened the original context issue #402150: Conflict with i18n block translation: Context defined blocks don't show up because it doesn't work on D7.
From the issue in context: "Block managed with context can be translated (string translation) but the translation never show up, always the original content.
If you try to only show a block for a language (in the block settings) it doesn't work, the block is always visible."
I don't get why it doesn't work anymore perhaps it's an other issue now...
Comment #34
jose reyero commentedYes, this is another issue.
Besides, i18n uses hook_block_view_alter() to do the block translation. If context doesn't run the blocks through that hook, or it loads the blocks differently to drupal core there's very little we can do.
Comment #35
nomad411 commentedOOhh! Am I reading this right? Context won't work with i18n?
Comment #36
gagarine commentedThis issue is fixed.
The work is now going on #1343044: Context and block translation. and #1320864: Context not respecting block language.
@nomad411 right now not, but if you use the patch from the two issue above it will works.