Hi,

we have a multilingual site. I am trying to use nrembrowser but get an error with our setup (On a basic non-multilingual testsite it worked without problem).
The problem exists in both the nodereference widget and wysiwyg.

Our nodetype from which we want to reference is multilingual, but the node we want to reference are not (I think this could be the problem, but i am not shure).
When i try to reference a picture from an nodereference widget it works in the "All" tab, but in the "Picture" tab i get these errors:

user warning: Unknown column 'n.language' in 'where clause' query: SELECT COUNT(*) FROM node WHERE (n.language ='de') AND ( type in ('picture') ) in ...sites/all/modules/nrembrowser/nrembrowser.module on line 1100.
user warning: Unknown column 'n.language' in 'where clause' query: SELECT nid, title FROM node WHERE (n.language ='de') AND ( type in ('picture') )ORDER BY created DESC LIMIT 0, 12 in ...sites/all/modules/nrembrowser/nrembrowser.module on line 1100.

From the wysiwyg button, i get in all three tabs (All, Picture, Videoclip):

user warning: Unknown column 'n.language' in 'where clause' query: SELECT COUNT(*) FROM node WHERE (n.language ='de') AND ( type in ('picture','videoclip') ) in ...sites/all/modules/nrembrowser/nrembrowser.module on line 1100.

user warning: Unknown column 'n.language' in 'where clause' query: SELECT nid, title FROM node WHERE (n.language ='de') AND ( type in ('picture','videoclip') )ORDER BY created DESC LIMIT 0, 12 in ...sites/all/modules/nrembrowser/nrembrowser.module on line 1100.

Thanks for helping,

Varac

Comments

digitalproductionart’s picture

Title: Internationalization Problem » This may be a similar issue..

This may be a similar issue with a different module - http://drupal.org/project/junk. I'm not sure, but trying to give more data for troubleshooting.

user warning: Unknown column 'n.nid' in 'on clause' query: SELECT COUNT(*) FROM node LEFT JOIN junk_node jn ON jn.nid = n.nid WHERE (jn.date IS NULL) AND ( type in ('image') ) in .../sites/all/modules/nrembrowser/nrembrowser.module on line 1100.

user warning: Column 'nid' in field list is ambiguous query: SELECT DISTINCT nid, title FROM node LEFT JOIN junk_node jn ON jn.nid = n.nid WHERE (jn.date IS NULL) AND ( type in ('image') )ORDER BY created DESC LIMIT 0, 12 in .../sites/all/modules/nrembrowser/nrembrowser.module on line 1100.

I see the thumbnails in the "All" and "My Media" tabs, but receive the above errors in the "Image" and "Video" tabs.

digitalproductionart’s picture

Title: This may be a similar issue.. » Issue with sql query...

Ooops, I didn't mean to change the title of this issue, and I don't remember what the title was. Sorry about that.

I ultimately "fixed" the problem, but it is not the correct way to do it. My situation was that nrembrowswer could not receive the image nodes due to the Workflow and Junk modules due to the complex permissions those modules were overwriting. All I needed from nrembrowser was the images that are published on the site, regardless what state of workflow they are in. The junk module unpublishes nodes automatically if a node is placed in the trash, so I don't have to worry about those.

I duplicated the the "My media" functionality and made a custom views query that searched image nodes that are unpulished. I made a views query for "ALL', left "My media" as is, and made custom views for content-types images and videos. I didn't take long once I understood the architecture.

But as I said, this is not the correct way to fix, as it negates the functionality of the settings page.