I'm getting the following error in IE but not in Firefox when I open the link to my view:
warning: Invalid argument supplied for foreach() in /home/.urena/ccd/drupal/sites/all/modules/views/theme/views-view-fields.tpl.php on line 22.
Line 22 is: foreach ($fields as $id => $field):
I'm sorry but the code is pretty much Greek to me.
My site is multilingual so I built the view using Insert a View module 6.x-1.x-dev. And used the Insert a View code to place the view inside a page. Works great in FireFox but in IE I get the error followed by my grouping feilds, which display properly.
I also get an error in both FF and IE when I enable the default glossary view and then select the link (this predated Insert a View):
warning: Invalid argument supplied for foreach() in /home/.urena/ccd/drupal/sites/all/modules/i18n/i18ntaxonomy.module on line 578.
And line 578 is: foreach($view->field as $index => $data) {
Am I doing something wrong or are there bugs with Views and internationalized sites? Thanks for any help, tips or options to try.
Comments
Comment #1
merlinofchaos commentedCan you please export the view in question?
This error is in i18n module, not Views, and should be filed as a separate issue.
Comment #2
meruthecat commentedThanks, it's posted with the export here: http://drupal.org/node/280407
Comment #3
merlinofchaos commentedIf it's possible, I'd like you to try this view without i18n active and see if it still generates the error. I don't see anything that should create that error and, in fact, the variable that it's accessing should absolutely not be empty, so I am concerned that maybe something external is corrupting this variable.
Comment #4
meruthecat commentedI have a second site running off the same install and when I enable the default Glossary view, it works fine. Then I disabled i18n and the related components on the problematic site and the view also worked. So I enabled the i18n components one-by-one as was able to isolate Multilingual Taxonomy as the one that is creating the error.
Since Multilingual Taxonomy was creating the glossary view error, I tried this test on the views-view-fields.tpl.php error I was getting in IE and it is also this component causing the conflict.
Does this help nail the problem at all or should I just post this information in the i18n thread? It seems clear that the problem has to do with i18n and Multilingual Taxonomy.
Comment #5
merlinofchaos commentedPlease post that on that thread, and reference this thread. We'll leave this open until we determine where the problem is, but for now I suspect i18ntaxonomy is doing something incorrect or mildly incorrect.
Comment #6
meruthecat commentedOk, it's posted here: http://drupal.org/node/280407.
Thanks for the help.
Comment #7
jose reyero commentedYes, i18n was not up to date with latest views. Now views is close to a stable release, I'll be updating i18n accordingly
Please, follow up on the i18n thread,
http://drupal.org/node/280407