Hello guys.

Accidentally there's one error appeared when I try to view node. It was Ok first but now there's problem every time I try to view any node.

Error message is:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.nid' in 'on clause': /* _classified_taxonomy_node_get_terms_by_vocabulary */ SELECT ti.tid AS tid FROM {taxonomy_index} ti INNER JOIN {taxonomy_term_data} td ON ti.tid = td.tid INNER JOIN {taxonomy_vocabulary} tv ON td.vid = tv.vid INNER JOIN {node} n ON t.nid = n.nid WHERE (ti.nid = :db_condition_placeholder_0) AND (td.vid = :db_condition_placeholder_1) AND (n.language IN (:db_condition_placeholder_2, :db_condition_placeholder_3)) ; Array ( [:db_condition_placeholder_0] => 29 [:db_condition_placeholder_1] => 4 [:db_condition_placeholder_2] => en [:db_condition_placeholder_3] => und ) in _classified_taxonomy_node_get_terms_by_vocabulary() (line 712 of /var/www/drupal7/sites/shinezar.com/modules/ed_classified/classified.module). 

I don't know reason why...

Any helps appreciated.

Comments

fgm’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Looks like you are not using 7.x-3.0, or you accidentally edited the file, or you enabled a node_access module that's breaking the query. If you look at the function, it does not include any join to the {node} table, which is the cause of that behavior.

  • Can you reproduce the problem on a clean install ?
  • If yes, can you erease the module directory and download that version again, and does it still happen after that new download ?
  • If no, find out which access control module you have added, as that is the most likely cause. Can you reproduce the problem once that module is disabled ?
togsbayar’s picture

Thanks for fast reply.

There's no changes for any module files and I've tried replace files from fresh download. Result was same.

I'll try reproduce the problem on a clean install...

Is there possibility that It's because of I installed i18n module ?
If so is't there any way to manage this ?

There was notify on module page(I wasn't really read that one when I installed module :P).

fgm’s picture

I don't think this can be related to i18n since it should not alter queries that way, but 7.x-3.0 is indeed unsupported on non-single-language-english sites. I would rather look for a node_access module, as these affect queries with the "nodeAccess" tag, and that query does carry it.

What you can also try is comment out the ->addTag('nodeAccess') line in that function and see if it changes anything. Also, please use the latest 7.x-3.x-dev for your tests, not 3.0: there were a few bug fixes since 3.0, and no schema change.

togsbayar’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks again for your suggestion.
I didn't used node_access module. No luck with installing dev version too.

I've just reproduced problem on new site :).

After I enabled i18n modules on new site problem appeared again !!! So I tried disabling modules one by one to know which module was trouble maker ... The problem maker was

Multilingual select 7.x-1.4

module.

It seems everything are OK if I disable that module.

I marked issue as FIXED since problem gone for me.

Thanks again for your advice that helped a lot for me.

fgm’s picture

Thanks for confirming the module causing the problem: this is good to know.

Status: Fixed » Closed (fixed)

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