I have upgraded the 2.x as far as I can, yet I am still getting repeated errors like the one below. Nothing apparent in the issue queue. I didn't set up this site so I am loathe to update to 3.x without greater knowledge on this. A google search reveals plenty of similar results - all pointing to error ridden web pages :(
Please advise?
Unknown column 'drupal_term_node.nid' in 'on clause' query: SELECT COUNT(*) FROM drupal_term_node t INNER JOIN drupal_node n ON t.vid=n.vid INNER JOIN drupal_node_access na ON na.nid = drupal_term_node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'content_access_author') OR (na.gid = 1 AND na.realm = 'content_access_rid') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 1 AND na.realm = 'term_access'))) AND ( n.status=1 AND n.type='ed_classified' AND t.tid=181 ) in /home/******/domains/*****.co.uk/public_html/sites/all/modules/ed_classified/ed_classified.module on line 663.
Comments
Comment #1
fgmYou really do /not/ want to use branch 2.x, which only has a few 3.x backports over the original broken multi-version code base.
Can you reproduce the problem on 3.x ?
FWIW, this specific problem results from the automatically generated count query within pager_query(). Defining an explicit count query OR reordering the join (node first, term_node second) so that the automatic access control generation performed by db_rewrite_sql() does not happily use a .nid column on whatever column comes first in the query /might/ fix this specific issue.
Did I already say you should not be using 2.x ?
Comment #2
niklp commentedThanks for the update Fred, I inherited this site so it is not my initial mistake that the site uses 2.x. I will investigate this. Didn't want to upgrade without checking that it wouldn't cause me serious issues. Assume under these circumstances it's safe to go ahead! :)
Will report back.
Comment #3
fgmThree weeks later, any news ?
Comment #4
niklp commentedNo but will have in the next few days no doubt, have a note to do this.
Comment #5
fgmNo problem, note that 6.3/7.3 RC2 has been released in the meantime, though. No upgrade path from 6.2, though, and it do not plan on writing one. But if you feel like doing it ... :-)
Comment #6
niklp commentedWoah, so... I've just updated to 6.x-3.x-RC2 from 6.x-2.x, what's going to happen? :/
Can probably just delete the ads and start again to be honest but wasn't aware of any of the above. Any info appreciated! :)
Comment #7
fgmProbably not much good after an upgrade. I would rather advise
That, or - better - write an upgrade path :-) I know you can do it.
Comment #8
niklp commentedIn the case of how I did things, rather than how I _should_ have done them (as I will do with the live upgrade), drush simply told me the module was incompatible and disabled it... is there a reasonable way to rectify this, or just "do it right next time"? I doubt it will matter that the dev version is borked, frankly.
Comment #9
fgmI think the somehow-right way to do it would be the one described at #7, and the actually right way would be to write an update hook to convert from one branch to the next.
The "incompatible" probably stems from
classified.install#classified_requirements(), which makes sure both modules are not enabled at the same time, to ensure a modicum of data safety.Comment #10
niklp commentedServer I'm on is only running PHP 5.1 (and I cannot change this currently) - is there anything I can do to retrofit PHP compatibility into the 3.x module or is it tantamount to idiocy/suicide/etc? I know you know I know better than this Fred, but my back's against the wall for now. It's either that or go back to 2.x...
Comment #11
fgm5.2 is not /that/ different from 5.1, unlike 5.3. It's probably worth it to make a DB files backup, change the ed_classified.info to say 5.1 instead, and try it that way.
Comment #12
niklp commentedI see - is that more an attempt to stop people going up to 5.3 rather than staying below 5.2??
Thanks Fred!
Comment #13
fgmMore like an attempt to keep people off of PHP 5.1 as it is way too old to be secure these days. I use it only of 5.3 myself, probably soon 5.4.
Comment #14
fgm6.x-2.x and 7.x-2.x is now obsolete.