Closed (fixed)
Project:
Sphinx Search
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2008 at 13:37 UTC
Updated:
16 Aug 2009 at 10:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
markus_petrux commentedt() is not reqyured here because it's a literal to build a SQL statement.
Is equivalent to:
Which is a fault on my side for not following Drupal conding standards here, but the statement should work. You would get a PHP error if that was not the case.
Theorically, the error "Could not obtain last nid." would mean that you don't have any node with enabled content types in your site. Is that possible?
Can you see any other error in the watchdog next to this one?
Comment #2
markus_petrux commentedComment #3
markus_petrux commentedAnther thing you could try is passing an explicit value for
last_nidwhen invoking the XMLPipe command. See docs/README-XMLPIPE.txt for examples.Comment #4
valcker commentedThe problem is not in following drupal standards, but in replacing %s with content type. For example, if I've chosen only one content type 'article', the following condition will be true:
So, if we will print out sql query on line 91(sphinxsearch.xmlpipe.in), we will see something like that:
'%s' was not replaced by content type name.
Yes, my patch is not good, because basically, we can replace the whole:
with just:
Even if there is only 1 item in node_types array, we will get next sql code: 'IN ('article',)', which is just fine.
Tell me if I'm wrong, but I just can't find a place were you replace '%s' with real value.
Comment #5
markus_petrux commentedOh, I see.
I tend to use this kind of optimization since I have sometimes found RDMS that work differently with IN() conditions. It doesn't add too much clutter to the code, so I would prefer to keep the original form.
I'm attaching a new patch as I will commit to CVS. I'll do that when I have the time since I'll be adding a new parameter for tagadelic blocks to select the method to build URLs, so tag clouds can link to taxonomy related pages, or to start a new search dialog with predefined filters for each term in the cloud. This will affect tagadelic/faceted search funcion arguments.
Thanks for the report :)
Comment #6
valcker commentedAgree, leaving only one "IN()" is too much. Thanks for reaction and for the module :)
Comment #7
markus_petrux commentedYou're welcome.
I expect to have some time later today, and it will probably ends in me releasing 5.x-1.1 with the above mentioned changes.
Comment #8
markus_petrux commentedThere we go. This fix has been included in 5.x-1.1, along a few changes/additions.
http://drupal.org/cvs?commit=137641
Comment #9
markus_petrux commented