I had a site with tagclouds module working perfectly, but when I have enabled the i18n module and taxonomy translation the tagclouds have disappeared.

When I visited a tagclouds page, for example:
tagclouds/chunk/1

I have a 404 error with this warning:

Warning: Cannot modify header information - headers already sent by (output started at /var/local/html/drupal7/node1/includes/common.inc:2754) en drupal_send_headers() (línea 1236 de /var/local/html/drupal7/node1/includes/bootstrap.inc).

Any idea?

Comments

oriol_e9g created an issue. See original summary.

oriol_e9g’s picture

Title: Cannot modify header information drupal when use i18n taxonomy module » Cannot modify header information - headers already sent when use i18n taxonomy module
Issue summary: View changes
oriol_e9g’s picture

Ok. I have localized the problem.

If you have all your terms with 'und' language and then enable the taxonomy translation all terms remain with the langocode 'und' but tagclouds expects the site language and cannot find any term.

The solution is update the table taxonomy_term_data from 'und' language to your default language or resave all terms.

Anyway there is a bug in tagclouds, because if the module cannot find any term should not return a early header an a 404 error.

joseph.olstad’s picture

Great detective work oriol_e9g

Now we just have to write a patch.

joseph.olstad’s picture

I suggest a possible patch:

http://cgit.drupalcode.org/tagclouds/tree/tagclouds.module

change the condition

$query->condition('n.language', $language->language);
on lines:

252

and

270

and

272

to be checking for $language->language OR 'und'

****EDIT *****
see comment #6

joseph.olstad’s picture

Actually, comment#5 is not where the i18n_taxonomy comes into play

see
line
397

and

415

NitinSP’s picture

Assigned: Unassigned » NitinSP
NitinSP’s picture

NitinSP’s picture

Assigned: NitinSP » Unassigned
joseph.olstad’s picture

So ya to fix this we'd want to look at

and modify the language condition to be:

$language->language OR 'und'

using the db api syntax of course.

line

397

and

415

oriol_e9g’s picture

@Joseph this is not the problem because i18n_taxonomy_term_name return the transliterated term if exist or the 'und' if not, we don't need the OR.

This problem appears when you enable entity_translation + i18n_menu. This is a new option unforeseen and probably there are some bugs in entity_translation module.

Posponed until: https://www.drupal.org/node/1665308

Chris Matthews’s picture

This issue is still postponed as issue #1665308: [i18n] Integrate Taxonomy Menu with i18n_menu and entity_translation. is still being worked on.