can not find node table when using a table prefix

ajayg - May 25, 2008 - 17:52
Project:HTML Export
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If you have defined table prefix, the since the code does not adhare to "drupal" way it can't find the node table. All
reference to this code

result = db_query("SELECT nid FROM node WHERE status=1 ORDER BY nid")

Need to change to

result = db_query("SELECT nid FROM {node} WHERE status=1 ORDER BY nid")

So it find the correct table with table prefix.

However I could not test this completely because of issue number #245169: Exported pages empty. But the code above is required as without it I get table not found error.

#1

ajayg - May 25, 2008 - 17:53
Status:active» needs review

#2

btopro - May 26, 2008 - 17:42

I'll patch that asap, this could be the reason for pages not publishing out though.

#3

ajayg - May 26, 2008 - 19:00

I already tried with this patch, still empty pages are getting created.

#4

btopro - June 5, 2008 - 16:52
Status:needs review» fixed

New version coming shortly (later today). I believe I've fixed the blank page issue, just tested on a lot of different installs w/ different settings on the URLs and it worked.

Also patched the code that you indicated.

#5

Anonymous (not verified) - June 19, 2008 - 17:01
Status:fixed» closed

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

#6

christian_gnoth - June 14, 2009 - 18:44
Project:HTML Export» Drupal
Version:5.x-1.0-beta2» 6.8
Component:Code» node system
Status:closed» active

Hello,
i am using drupal 6.12 and having the same problem. only with node included in {} it is working.

#7

ajayg - June 15, 2009 - 04:16
Project:Drupal» HTML Export
Version:6.8» 6.x-1.0
Component:node system» Code

When I opened this issue it was against HTML export module. Why you changed to drupal core? Chnaging back the project as I am not aware of any issue with core.

 
 

Drupal is a registered trademark of Dries Buytaert.