i18n blocks creates conflicts with themes and modules that override the theme_blocks function

sullix - May 8, 2009 - 15:41
Project:Internationalization
Version:6.x-1.x-dev
Component:Compatibility
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

i18nblocks module uses its own method to theme blocks... so we cannot override the Drupal theme_blocks function in themes (template.php) or in other modules (in particular : Context).

Read : #402150: Conflict with i18n block translation: Context defined blocks don't show up

Thanks

#1

Jose Reyero - June 13, 2009 - 14:07
Status:active» duplicate

I'll be following on the Context module issue.

#2

makara - November 2, 2009 - 07:43
Status:duplicate» active

Hi 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

#3

paranojik - November 13, 2009 - 12:33

Subscribing.

#4

Ryan Palmer - November 13, 2009 - 21:01

One solution would be to get rid of i18n block entirely, and use a single context per language instead...

#632322: Context language condition support

#5

kdebaas - December 5, 2009 - 16:55
Title:Conflict between Context and i18n blocks» i18n blocks creates conflicts with themes and modules that override the theme_blocks function

See also #644044: Activating module Block Translation breaks sidebar rendering in the Zen issue queue.

#6

makara - December 8, 2009 - 08:48
Status:active» needs review

I 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.

AttachmentSize
i18nblock.patch 3.83 KB

#7

makara - December 8, 2009 - 08:51
Version:6.x-1.0» 6.x-1.x-dev

#8

Kameleonten - December 8, 2009 - 12:53

Thanks, your patch works great!

 
 

Drupal is a registered trademark of Dries Buytaert.