Posted by dan.crouthamel on January 9, 2009 at 3:54am
| Project: | Brilliant Gallery |
| Version: | 6.x-3.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | brilliant_gallery_checklist, Table doesn't exist, table prefix |
Issue Summary
After installing the latest version I'm told this table doesn't exist. However, the code to create the table seems to be commented out in the install file.
Comments
#1
Did you run /update.php after installing the new version? The necessary code is not commented out, just an old version of it. Let me know. Thanks.
#2
Thanks for reporting the problem! Now solved -- get 6.x-2.2 and run /update.php
#3
Still having a problem, but that's because I tack on drupal_ in front of the database name. Shouldn't the following,
db_query("select qid,state from brilliant_gallery_checklist ".
be
db_query("select qid,state from {brilliant_gallery_checklist} " ?
#4
I am also having this issue. Subscribe.
#5
hi, i dont think this is fixed!
i know drupal only for a few days and today i tried this module, and i met this error also ...
i looked at *.module file and there is code mentioned above ("select ...") and there is no "prefix" part which i use for my tables (table 'drupal_brilliant_gallery_checklist' exists in my DB) ... other modules have some variable placed instead of table name - like {node} etc ...
is this the problem? or will drupal replace table name when executing this query?
#6
Have this bug after updating drupal and gallery to the last version, the updates were successfull. I have prefix 'vea' in the names of the tables, and the error report looks like this:
user warning: Table 'zn_vea.brilliant_gallery_checklist' doesn't exist query: select qid,state from brilliant_gallery_checklist where nid=9999999 and qid not like 'user-%' and user=0 union select qid,state from brilliant_gallery_checklist where nid=9999999 and qid like 'user-%' and user=1 in /home/www/zn/htdocs/sites/all/modules/brilliant_gallery/brilliant_gallery.module on line 110.
Seems that it doesn't use table prefix in the query (zn_vea is the database name)
#7
The problem hasn't been fixed yet. Why, I don't know. Any place in the module code that tries to access brilliant_gallery_checklist needs to be changed to {brilliant_gallery_checklist}. It's a simple find and replace.
For what it's worth, I decided not to use this module. I'm using the Contemplates & Zend framework modules, and writing custom code that uses the Picasa API to pull the info I want and display the photos in a lightbox. I created a custom content type with a simple field that stores the picasa web album id - from that, I generate all the info I need.
#8
I've made the changes Dan suggested - it seems to be working fine for us now. Attached file should be renamed *.module and replace the current download file for 6.x-3.0
#9
revising version number - note: this problem seems to appear only when using a table prefix (hopefully the fix will be included in the next release)
#10
guess I should also indicate patch available
#11
Non of the above fixes work for me.
If I include i try
Any place in the module code that tries to access brilliant_gallery_checklist needs to be changed to {brilliant_gallery_checklist}. It's a simple find and replace.
I get a bank page when I refresh.
If I use the uploadet .module file it's the same.
What to do?
I have attached my module file. (renmmaed to .txt from .module)
The specefic error I get is
user warning: Table 'coffeeshop.brilliant_gallery_checklist' doesn't exist query: select qid from brilliant_gallery_checklist where qid like 'user-%' and state='1' in /home/e-smith/files/ibays/sbktitdk/html/coffeeshopdk/modules/brilliant_gallery/brilliant_gallery.module on line 659.
My prefix for the sql is drupal_
Like to the page is http://sandbox.ktit.dk/coffeeshopdk/?q=node/5
Any help would be much apreciated.
#12
I am now using the old version of BG and it works perfectly :) I will upgrade to this version when it's been fixed :D BG rox. Ty.
#13
I replaced the brilliant_gallery.module file by the one Dan (#8) attached, ran a /update.php, and now the "Table 'mydb.brilliant_gallery_checklist' doesn't exist query: select qid,state from brilliant_gallery_checklist where ..." error disappeared.
The bug affects only those who use table prefix.
#14
That's right. Great find! I used the same patch by Dan and works well for my installation.
#15
Yes. it's true.
I have installed drupal 6.12 with using table prefixes.
So now I have installed http://ftp.drupal.org/files/projects/brilliant_gallery-6.x-3.0.tar.gz and issue is still appear.
Please inform me (landike@gmail.com) or here if issue is fixed?
I'm interested in using of this module.
#16
$result = db_query("select qid,state from brilliant_gallery_checklist ".
" where nid=%d and qid not like 'user-%' and user=0 ".
" union ".
"select qid,state from brilliant_gallery_checklist ".
"where nid=%d and qid like 'user-%' and user=%d ", $nid, $nid, $uid
This is hardcode and prefixes is not supported HERE..
PLEASE FIX it ASAP
user warning: Table 'database.brilliant_gallery_checklist' doesn't exist query: select qid,state from brilliant_gallery_checklist where nid=9999999 and qid not like 'user-%' and user=0 union select qid,state from brilliant_gallery_checklist where nid=9999999 and qid like 'user-%' and user=1 in /****/sites/all/modules/brilliant_gallery/brilliant_gallery.module on line 110.
#17
having the same issue when i'm trying this module
it can be easily solved by replacing "brilliant_gallery_checklist" in all query with "{brilliant_gallery_checklist}"
and this is the official way to support database prefix in drupal query
#18
After reinstall current module I've installed it again.
No errors.
Looks like replacing "brilliant_gallery_checklist" in all query with "{brilliant_gallery_checklist}" HELPS, but need to test it all.
#19
Patch for v6-3.4 in http://drupal.org/node/517000
#20
Thanks! That patch was committed to dev today. Will be in 6.x-3.5.
#21
Automatically closed -- issue fixed for 2 weeks with no activity.