http://www.fejos.hu/urllist

user error: Unknown column 'node.nid' in 'field list'
query: SELECT DISTINCT drpl_prd_DISTINCT(node.nid), type, status, promote, changed, dst FROM drpl_prd_node LEFT 
JOIN drpl_prd_url_alias ON src=CONCAT('node/',drpl_prd_node.nid) in 
/data/www/fejos.hu/root/includes/database.mysql.inc on line 66.

I have additional modules installed, maybe some of them is incompatible.

My enabled modules are:
Name:-----------Filename:
block modules/block.module
comment modules/comment.module
filter modules/filter.module
css modules/css/css.module
node modules/node.module
page modules/page.module
story modules/story.module
system modules/system.module
taxonomy modules/taxonomy.module
user modules/user.module
watchdog modules/watchdog.module
aggregator modules/aggregator.module
archive modules/archive.module
blog modules/blog.module
contact modules/contact.module
help modules/help.module
locale modules/locale.module
menu modules/menu.module
path modules/path.module
poll modules/poll.module
book modules/book.module
profile modules/profile.module
queue modules/queue.module
search modules/search.module
statistics modules/statistics.module
throttle modules/throttle.module
tracker modules/tracker.module
upload modules/upload.module
i18nmenu modules/i18n/i18nmenu.module
variables modules/variables.module
adminblock modules/adminblock.module
click modules/click.module
vimcolor modules/vimcolor/vimcolor.module
diff modules/diff/diff.module
node_type_filter modules/node_type_filter.module
nodelist modules/nodelist.module
cronplus modules/cronplus.module
simple_access modules/simple_access/simple_access.module
highlight modules/highlight.module
gsitemap modules/gsitemap.module
xstatistics modules/xstatistics.module
dashboard modules/dashboard/dashboard.module
checkout modules/checkout.module
weight modules/weight.module
i18n modules/i18n/i18n.module
urllist modules/urllist.module
--
TMS

CommentFileSizeAuthor
#2 phpinfo.php.htm32.9 KBtfejos
#1 urllist_query_rewrite.zip1.74 KBdeekayen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deekayen’s picture

Assigned: Unassigned » deekayen
Status: Active » Needs review
FileSize
1.74 KB

Please try the attached. If it doesn't work, the new error and your MySQL version might be helpful.

tfejos’s picture

FileSize
32.9 KB

Tahnks for your fast action. :)
The situation is the same.
http://www.fejos.hu/hu

user error: Unknown column 'node.nid' in 'field list'
query: SELECT DISTINCT(n.DISTINCT(node.nid)), type, status, promote, changed, dst FROM 
drpl_prd_node AS n LEFT JOIN drpl_prd_url_alias ON src=CONCAT('node/',n.nid) in
 /data/www/fejos.hu/root/includes/database.mysql.inc on line 66.

Our Mysql version: 5.0.16-max-log
Php veriosn: 4.3.11
See attached phpinfo file (if I could attach it :).

deekayen’s picture

Status: Needs review » Postponed

I didn't even know you could run MySQL 5 with PHP4. It might take me a while to duplicate the environment. I'd rather spend the time upgrading it to work with Drupal 4.7. I don't suppose you're planning on upgrading Drupal soon...

Anyone else experiencing this bug, details on your configuration would be nice since I haven't been able to reproduce it yet.

tfejos’s picture

Dear Deekayen!

urlist is works for me on my test site (not fejos.hu) in a completely different enviornment.
Without any additional modules. (only standard Drupal modules + urllist).

"Server" "OS" is (it's not an OS neither server ;-) ): Windows XP
DB: MySQL 5.0.15
PHP: 5.0.5
(current xampp veriosn for windows).

I will make more tests on this platform.

deekayen’s picture

I doubt PHP4 is the problem. I have no experience with the db prefixing option. I'm guessing since it works on my FBSD and WinXP machines with PHP5 and MySQL4&5, db prefixing would be the next thing to look at. Modules conflicting seems unlikely (though not impossible).

tfejos’s picture

Yeah, you are right. It doesn't depend on php version. The same error on PHP5. :(
I will redeploy my Drupal and write the final results.

tfejos’s picture

After reinstall I was more careful. I think the Simple Access module caused the bug!

tfejos’s picture

Or your module and Simple Access ( http://drupal.org/project/simple_access ) are not compatible!

eaton’s picture

I haven't had a chance to test out urllist myself, but it appears the basic query that drives the module is making incorrect use of the db_rewrite syntax.

db_rewrite_sql("SELECT DISTINCT {node.nid}, type, status, promote, changed, dst FROM {node} LEFT JOIN {url_alias} ON src=CONCAT('node/',{node}.nid)",'node');

should be something like:

db_rewrite_sql("SELECT DISTINCT n.nid, n.type, n.status, n.promote, n.changed, u.dst FROM {node} n LEFT JOIN {url_alias} u ON u.src = CONCAT('node/', n.nid)",'node');

deekayen’s picture

The first followup I made to this bug, in the attachment, I changed the query to just that and tfejos said it was still broken. I do at least feel better that I'm not the only one that thought of the same query change. I'll go ahead and commit that part, though.

deekayen’s picture

Oh, duh. There's no alias prefix on the other columns. I'll upload a new patch for tfejos to try with that.

deekayen’s picture

Status: Postponed » Fixed

Commited to CVS. Thanks Jeff.

tfejos’s picture

Status: Fixed » Needs work

Thanks for your quick response.
I have tested it on a clean Drupal install + URL list & Simlpe access (clean URLs enabled), but nothing more customization.

Results:
http://localhost/fejos.hu/drupal465/

user error: Unknown column 'node.nid' in 'field list'
query: SELECT DISTINCT(n.DISTINCT(node.nid)), n.type, n.status, n.promote, n.changed, u.dst FROM node n LEFT JOIN 
url_alias u ON u.src=CONCAT('node/',n.nid) in 
D:\xampp\xampp\htdocs\fejos.hu\drupal465\includes\database.mysql.inc on line 68.

So, something is wrong yet. I dont know what, but there is a conflict.
Do you have any idea?

tfejos’s picture

Could you check Simple access also?
I think it contains the bug.

rjl’s picture

It seems to me that since the table 'node' has been aliased in the FROM clause to 'n' that all references to the table 'node' must be 'n'

In the SELECT clause we see 'node.nid' shouldn't it be 'n.nid' ?

On another note

SELECT DISTINCT(n.DISTINCT(node.nid)) ...

is about the oddest thing I've ever seen in SQL, is that correct (assuming 'node.nid' becomes 'n.nid') or a typo? If not, could you elaborate on what it does exactly.

deekayen’s picture

The current query in CVS is:

  $result = db_query(db_rewrite_sql("SELECT DISTINCT(n.nid), n.type, n.status, n.promote, n.changed, u.dst FROM {node} n LEFT JOIN {url_alias} u ON u.src=CONCAT('node/',n.nid)",'node'));

I might actually be able to work on this bug tonight and properly RTFM db_query() and db_rewrite_sql() to see why it might be adding another distinct. Surely there's a good explanation for it. URL list was just a quick hack from the gsitemap module, so I'll be interested to see if it conflicts with Simple Access, too.

deekayen’s picture

Just curious... what if I just added urllist functionality to gsitemap? There's some duplication of features and the only real difference is 20 lines of code.

tfejos’s picture

Both function in one module, sounds good. :)

http://foobar.com/gsitemap for traditional gsitemap
http://foobar.com/urllist for newly added urllist funcionalty

It would be great, if we can enable either of them at settings: gsitemap (one for Google and one for Yahoo).
Or dont have too sweet dreams? :)

deekayen’s picture

Status: Needs work » Fixed

I got it to work with and without Simple Access installed. Committed to CVS.

deekayen’s picture

To the note about adding urllist to gsitemap, I'm going to postpone that cause I was only going to do it as an alternative to actually fixing this bug.

deekayen’s picture

Just noting for future reference changes made as a result of http://drupal.org/node/41644 could affect this issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)