Closed (fixed)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2008 at 22:02 UTC
Updated:
23 Aug 2008 at 16:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
ali_b commentedI have the same problem. Everything working great, i have this message after adding a view.
Comment #2
Wutimer commentedSame here, things work well other than that error message.
Comment #3
Wutimer commentedWell, there's a quick hack to get rid of the error message; though it does involve editing the core of i18ntaxonomy.module:
Wrap the funciton in [ if (is_array($view->field)) { ]
Line 575:
Comment #4
droshani commentedThis is too technical, how should I be able to implement your suggestion?
Comment #5
Wutimer commentedHonestly, it's not very graceful; I would say ignore my suggestion and do one of the following:
Comment #6
Alice Heaton commented@Wutime : I had the same error - and did a similar patch. I don't think your version isn't gracefull -- that's exactly what needs to be done. As far as I can see, the code that generates the error translates the field titles when called from a view ; and doesn't work when your view doesn't have fields. This needs to be tested for, which is what you are doing.
@all : I would suggest changing the title of this issue to "Error when displaying view without field titles" or something ? What do people think ?
@koyauni : Don't fear, it's not that technical. If it's not urgent, wait for an update but if you really need this fixed, do the following :
1. Do this on your TEST site, not on a live site.
2. Go in your drupal directory.
3. Navigate to modules/i18n/i18ntaxonomy
4. Edit the file i18ntaxonomy.module
5. In that file, go to line 572 ; which should be the following :
function i18ntaxonomy_views_pre_view(&$view, &$items) {
6. Just BELOW that line, add the following lines :
if (!isset($view->field)) {
return;
}
7. That's it. This is a similar patch to Wutime's - it's just slightly easier for you to see what needs to be changed !
Comment #7
droshani commentedI am fine with it if you wan to chnage the name of this post so it will attract more respond from developer.
Than you for your easy steps I will do this see what will happen.
Comment #8
Wutimer commented@Anselm Heaton : A nice touch in your changes and easier to follow; thanks for following up!
Comment #9
bforchhammer commentedI had the same error, thanks!
Attached is the respective patch file, patched against current 6.x-1.x-dev-version (25/06/2008).
Comment #10
metabits commentedI am having a similar problem. Each time I am updating a node, I am getting this warning:
warning: Invalid argument supplied for foreach() in xxx/sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.module on line 554.
warning: Invalid argument supplied for foreach() in xxx/sites/all/modules/i18n/i18nsync/i18nsync.module on line 192.
Any idea where is this coming from? I am not using views and my site works fine, so I think I will wait for an update of the i18n module, but it will be good to know why. Anyway, I thought it could interest to those that care for the module.
Comment #11
jose reyero commentedMoved it to a different module (so you can enable/disable it), and added some aditional check so this error won't happen anymore.
I don't think any of these patches really works though. Views-taxonomy translation needs to be reimplemented.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.