Hello,

I'm running Drupal 7.34, Rules 7.x-2.8 and i18n 7.x-1.12
I noticed that many times when I click on "Rules>Edit>Actions>Edit", I get the following pink "Notice" on top of my page:

Notice: Undefined index: custom translation language in RulesI18nStringEvaluator::help() (line 182 of /home/'user'/public_html/sites/all/modules/rules/rules_i18n/rules_i18n.rules.inc).

The only Rules that cause this error are the ones that have in their Edit>Actions>Edit page, a comment saying:

Translation: Translations can be provided at the Translate tab. The argument value is translated to the current interface language. (see attached Screenshot)

The number of fields where this comment shows up in the Edit>Action page, matches the number of times the error/notice shows up in pink at the top of the page. (see attached Screenshot)

Also, when I disable the "Rules Translation" module, this problem disappears... But I get the following message on top of my website:

1 Rules configuration requires some of the disabled modules to function and cannot be executed any more.

Furthermore when I go to admin/config/workflow/rules, I see the following error (in red text) under the Custom Rule I created:

Error: Missing required module rules_i18n.

I don't see this "Error" under other Default Rules, not even under those that also display the pink "Undefined index" Notice when I go to Edit>Actions, like I explained above.

Now... When I reactivate the "Rules Translation" module, I get the message:

All dependencies for the Rules configuration RFD Sales Notification are met again, so it has been re-activated.

...Where "RFD Sales Notification" is precisely the Custom Rule I created, so this seems to indicate that when a Custom Rule is created it becomes dependent on the Rules Translations (i18n module) in a way that the Default Rules are not. Why?..

I'm sorry if this sounds a bit confusing but I'm quite confused myself and I hope I have provided necessary and sufficient info. Any idea what this means and how to avoid/correct it? It seems that something is not working well between Rules Module and i18n Module.

Many thanks!

Miguel

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ARTIMEDIA’s picture

Issue summary: View changes

Update: Please notice my screenshot. I found out that not all existing rules show this notice/error while editing Actions. It only happens when there is a comment saying:

<strong>Translation:</strong> Translations can be provided at the Translate tab. The argument value is translated to the current interface language.

The number of times this error/notice shows up in pink at the top of the page, matches the number of fields where this comment shows up, in the "Edit Action" page. What does this relation mean and how can this help understand the problem?

ARTIMEDIA’s picture

Issue summary: View changes
FileSize
100.01 KB
ARTIMEDIA’s picture

Issue summary: View changes
ARTIMEDIA’s picture

Issue summary: View changes
Jose Reyero’s picture

Status: Active » Needs review
FileSize
835 bytes

Besides being pretty annoying, this was breaking some other features, like editing some rules (the notice/warning prevented the edit form from working properly).

I don't know about the internals or rules, but fixed with this simple patch

Status: Needs review » Needs work

The last submitted patch, 5: rules_i18n-remove_notice.patch, failed testing.

TR’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Priority: Major » Minor
Status: Needs work » Needs review
Issue tags: -internationalization i18n +i18n
FileSize
707 bytes

Re-rolled patch since it was in the wrong format.

The patch addresses the PHP notice Notice: Undefined index: custom translation language in RulesI18nStringEvaluator::help(). This is still an issue.

  • TR committed 4bd4c40 on 7.x-2.x authored by Jose Reyero
    Issue #2445459 by Jose Reyero: Rules Translation Error Notice when...
TR’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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