Reviewed & tested by the community
Project:
Advanced Book Blocks
Version:
6.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2010 at 08:52 UTC
Updated:
30 Dec 2013 at 18:47 UTC
Jump to comment: Most recent
Comments
Comment #1
majdi commentedAfter I took a look at the module ,
in line 194 we have
$mlid = db_result(db_query(db_rewrite_sql("SELECT mlid FROM {book} b WHERE b.bid = %d AND b.nid = b.bid","b","bid"), $bid));I replace it with
$mlid = db_result(db_query(db_rewrite_sql("SELECT mlid FROM {book} b WHERE b.bid = %d AND b.nid = b.bid","{book}","bid"), $bid));Any idea why is that ?
Thanks
Comment #2
PixelClever commentedI can't reproduce this. Deleting the alias doesn't seem like a good idea. Perhaps the mlid needs an alias in front of it? Try this:
Comment #3
majdi commentedI add the line
after i add it I got the following error
Comment #4
YanBoudreau commentedI replaced that line and the module is now working:
$mlid = db_result(db_query(db_rewrite_sql("SELECT mlid FROM {book} WHERE book.bid = %d AND book.nid = bid","book","bid"), $bid));
Comment #5
hanskuiters commented@YanBoudreau: you replaced the alias with 'book'. Is that a good idea?
It seems that i18n is causing the problems. I had this working without the errors in a testsite which didn't had i18n installed.After some testing: changing the alias 'b' to 'book' solves the errors. So there might be a problem with using the alias 'b'.
My changes to #194:
Comment #6
jvieille commentedI had this error, using i18n.
#5 fix it.
Comment #7
jvieille commented