Hi,

I have installed the Dec. 1, 6.x-1.x-dev version of i18n and am not able to configure views to filter by Content negotiation. When the filter "Node translation: Content negotiation" is selected, the follow error appears:

Error: handler for node > content_negotiation doesn't exist

The Views module on our site has been upgraded to 6.x-2.8.

Thanks for your help!

Comments

markus_petrux’s picture

Status: Active » Needs review

I have also found this problem, using latest dev snapshot of i18n and Views 2.

The following mini-patch to includes/i18nviews.views.inc fixed it for us.

 function i18nviews_views_handlers() {
   return array(
     'info' => array(
       'path' => drupal_get_path('module', 'i18nviews') . '/includes',
     ),
     'handlers' => array(
       'content_negotiation_filter_handler' => array(
         'parent' => 'views_handler_filter',
-        'file' => 'includes/content_negotiation_filter_handler.inc'
       ),
     ),
   );
 }

ie. remove the line that is marked with the minus sign.

Also, you should probably clear the Views cache (see Site building -> Views -> Tools -> Basic).

Agence Web CoherActio’s picture

Hi Mark,

Your fix works perfectly.

Do you know how to set up a view that lists all nodes that have the same language + all language neutral nodes?

My use-case is the following: when I call a particular node, I'd like to have a block listing all nodes sharing the same taxonomy term as the node displayed and being in the same language as this node OR being language neutral.

Thanks

Laurent

markus_petrux’s picture

Priority: Normal » Critical

Hi, we recently updated i18n module, still with this issue, and removing that line, as decribed in #1, still fixed the issue for us.

Marking it as critical because updating the module does not generate any kind of warning while the Views where you use this filter remain broken.

kalinchernev’s picture

The problem occurs again after update in i18n at 3rd March, the fix helps again

pithagora’s picture

4th of march, I updated i18n module, occured same problem, patch fixed it.

JGO’s picture

lol, same here. Again something with wrong this module.
I have like 2 big issues with it. Now I do a simple update and I have an issue again :p
Ah well, nobody is perfect :)

the removing of the line fixes it btw

Jose Reyero’s picture

Status: Needs review » Fixed

Sure, if you update the module you need to re-apply your patches.

Committed into the module now.

@markus_petrux, you have now commit access for i18n, in case you need to fix any of these small issues again, just commit.

Please keep in mind we are now trying to make this module compatible with both views 2.x and 3.x

Thanks.

2xe’s picture

experienced the same, upgrading to -dev solved the problem. (But I have never applied any patches...) Maybe you should post a note of this issue on the front page...? At least my site looked like s**t with many mixed languages after upgrading.

markus_petrux’s picture

@Jose: Thanks for the confidence. I'll be sure to test and wait for enough feedback before touching anything.

mattiasj’s picture

Thanks for taking care of this, will try the latest dev out tomorrow since this issue made some of our multilingual sites break.

JGO’s picture

Yes, this 1.3 version breaks all sites with views (who doesn't use views these days?)

mattiasj’s picture

the dev-version fixed it on our sites.

Anybody’s picture

Thank you very much. Hope this will be fixed in next version!??

ak’s picture

Status: Active » Fixed

Updating the i18n module from 6.x-1.2 to 6.x-1.3 broke my views 2.8 translation filter support.

Everything was fine with i18n 6.x-1.2 and views 2.8 for me. I remember having two filter options in views. "Node translation: Content negotiation" and another one "i18n: Translated content …" or similar as a own group to filter my view. After updating i18n 6.x-1.2 to 6.x-1.3 these options are missing now on the views edit form and the error described in the initial post appears instead?!

All my views are broken, not filtering translations anymore with the i18n 6.x-1.3 module.

Must I switch to the dev-version to solve this?

ak’s picture

Version: 6.x-1.x-dev » 6.x-1.3
Status: Fixed » Active

ak’s picture

Status: Fixed » Active

I'm although trying to use the Finder module http://drupal.org/project/finder to filter my views pages. I'm not sure of this is old, new or even related but now I get following error on those pages. Seems to me that there were some heavy changes to i18nviews.module that break a lot of stuff? I hope this error helps tracking down where the problems occur.

Fatal error: Cannot use object of type content_handler_field_multiple as array in /home/stevensc/public_html/pressflow/sites/all/modules/i18n/i18nviews/i18nviews.module on line 144

Has someone got any suggestion where to go from here? Downgrade to i18n 6.x-1.2 again, can I just reupdate to the older version? Patch up 6.x-1.3? Use i18n dev-version?

Jose Reyero’s picture

Status: Active » Fixed

@ak,

Please, just reopen the issue if it still happens with the -dev version

mediameriquat’s picture

This is a MAJOR bug, since the content negotiation on multilingual sites is totally screwed up. All languages get scrambled together.

Another release should be made ASAP to correct this.

Since I couldn't revert to the previous module version without restoring yesterday's database and losing a few hours of work, I re-uploaded the i18nviews folder of the previous version, while maintaining all other folders to their most recent versions.

So far, so good. I'd rather tolerate a moderate security risk than screw up my clients websites or having zillions of error messages.

++

Thanks for the good work though, i18n is a killer app.

ak’s picture

Dev-Version fixed it for me, thanks.

kenorb’s picture

Thanks.

j0nathan’s picture

Project: Internationalization Views » Internationalization
Version: 6.x-3.x-dev » 6.x-1.3
Status: Active » Fixed

Hi,
Version 6.x-1.x-dev (2010-Mar-05) solved my issue.

ain’s picture

I can confirm J0nathan's report above, the issue still exists in 6.x-1.3. Upgrading to 6.x-1.x-dev (2010-Mar-05) fixes the issue.

jkreuzer’s picture

Status: Fixed » Needs work

I can confirm that this problem still exists in 6.x-1.3. When I moved back to 6.x-1.2, the problem went away.

alayham’s picture

Works for me as well.

rogerpfaff’s picture

subscribing for the day this fix makes it into stable.

sagannotcarl’s picture

Subscribing.

sagannotcarl’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Needs work » Fixed

This is fixed in the dev version.

If you are using a previous version use the fix in comment #1 above. It worked great for me using 1.4.

Status: Fixed » Closed (fixed)

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

mths’s picture

subscribe

xavier.carriba’s picture

I have the same issue with i18n 6.x-1.5 and Views 6.x-2.11

Sorry solved witd i18nviews module

tomsm’s picture

Status: Closed (fixed) » Active

This patch is still needed, also see this issue:
http://drupal.org/node/861288#comment-3233918

tomsm’s picture

Project: Internationalization » Internationalization Views
Version: 6.x-1.x-dev » 6.x-3.x-dev
domidc’s picture

Project: Internationalization » Internationalization Views
Version: 6.x-1.3 » 6.x-3.x-dev
Status: Fixed » Active

I confirm the patch is still needed

jasom’s picture

I still have
Fatal error: Cannot use object of type content_handler_field_multiple as array in sites\all\modules\i18n\i18nviews\i18nviews.module on line 124

And after instaling latest dev of i18n and i18nviews i got this

Fatal error: Cannot use object of type content_handler_field_multiple as array in sites\all\modules\i18n\i18nviews\i18nviews.module on line 144

I have started new issue for i18n http://drupal.org/node/909180

miro_dietiker’s picture

Status: Active » Fixed

Finally time this has been committed...

Thank you for patience.

Status: Fixed » Closed (fixed)

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