Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Undefined index: en in opencalais_get_suggestions() (line 381 of opencalais/opencalais.module).
Warning: Invalid argument supplied for foreach() in opencalais_get_suggestions() (line 381 of opencalais/opencalais.module).
I enabled opencalais auto suggest for a content type
I hit edit for the node and I get the above at the top of the page
I think 'en' stands for 'english' as I have content translation enabled.
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI get this when I select the following and when I have content translation enabled:
"index textfields should not be enabled"
Comment #2
ElusiveMind CreditAttribution: ElusiveMind commentedComment #3
ElusiveMind CreditAttribution: ElusiveMind commentedThis may have been part of the old dev branch. I cannot locate this issue in the current one.
Comment #4
nagy.balint CreditAttribution: nagy.balint commentedI still have this issue with 7.x-1.2 which is only an unrelated commit behind the latest dev.
The issue seems to be that the following line
$node->{$field_name}[$node->language]
will try to use the node's language instead of the fields language. And so if the node is created by default with the "en" language, but there is no field translation, then the field only has "und" and so it will throw undefined index, and wont work.
Of course this can be fixed by turning on translation and setting node language to neutral language, but that would then prevent the node to be translated.
Comment #5
ElusiveMind CreditAttribution: ElusiveMind commentedAs irony would have it, I was able to reproduce this today while looking into this. Investigating a fix.
Comment #7
ElusiveMind CreditAttribution: ElusiveMind commentedNow in dev branch for review