Unfortunately, this ridiculously simple patch didn't make it into Drupal 7 (#318328: Hook to respond to change of source translation). Either we need to have an extremely strong push and reasoning to get it through, or we're going to have to make a Drupal 7 port of Translation Helpers. I'm mid-port of Flag module now (which is one of the main reasons this module was written for I believe), so we'll have something to test at least soon.

Comments

spacereactor’s picture

Subscribing

lpalgarvio’s picture

subscribing

JockeL’s picture

Subscribing

spacereactor’s picture

I want to use flag in drupal 7 but.... it need this baby this. :( how is the status to port this drupal 7?

nedjo’s picture

I committed a quick untested upgrade and posted a D7 dev release. Please test and report back in this issue, noting results and describing any errors. Thanks!

I used the new hook_module_implements_alter() instead of module weight to get this module's hook_node_delete() to run before translation module's.

spacereactor’s picture

i install D7 dev, at the reports/status page doesn't give me flag error anymore. Server running on php 5.2.14, 5.1.49-MariaDB, nginx/0.8.54 on drupal 7 release. Update if there error else where.

nedjo’s picture

Testing is a bit complex. Suggested steps (I haven't used flag multilingually, so I'm kind of guessing):

* Create a flag type and configure it to store flags per translation set, rather than per translation.
* Create a piece of content. This is the source translation.
* Translate the piece of content into two other languages.
* Flag the content with the flag type you created above. Visit each of the members of the translation set (the translations of the original piece of content.) Ensure that all translations are flagged.
* Delete the original piece of content (the source translation).
* Ensure that all remaining translations are still flagged. (What should have happened is that one of the remaining translations was designated the new source translation and existing flags on the translation set were transfered to it.)

tebb’s picture

When attempting to delete content I get the following error:

Fatal error: Call to undefined function db_result() in /pathToD7/sites/all/modules/translation_helpers/translation_helpers.module on line 43

I read elsewhere that db_result() is not in D7.

Found it here: http://drupal.org/update/modules/6/7#db_result

nedjo’s picture

Title: Drupal 7 Port » Drupal 7 Port of Translation helpers

@Dru-p: thanks, I applied a fix, pls retest.

tebb’s picture

@nedjo

Re-tested.

Can now delete content with this module enabled without errors.

Thanks a lot.

Robin Millette’s picture

Status: Active » Fixed

7.x-1.0 was released 2011-Nov-30, so closing (fixed).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.