Hi,

I've just installed the 6.x-1.x-dev version as today and got the following error while browsing the site:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ups.active = 1' at line 4 query: SELECT ups.stock, up.nid FROM uc_products up LEFT JOIN uc_product_stock ups ON ups.sku = up.model WHERE up.nid IN() AND ups.active = 1 in .../sites/all/modules/uc_out_of_stock/uc_out_of_stock.module alla riga 172.

Comments

hanoii’s picture

Can I have a link to the page? Is there an actual product there?

hanoii’s picture

I just committed something that should prevent this error, which I don't know why it happened. I mean, I guess that error was because of some reason which I am now handling, but I am still unsure why that reason might be.

If you please test the latest dev (tomorrow's) that will be great.

Also, when you do, if you look at some JS console either in chrome or firebug, you should see some info from this module, try to get back to me on that as well if you can.

That link I asked in #1 would be useful as well

mandreato’s picture

Well, the fact is that browsing the site wasn't me but Google's crawler... So I realized the error just checking the log, not directly.
BTW, the path which generated the log was .../uc_out_of_stock/query and the patch you posted seems to resolve it, by limiting to show "No node_ids sent." without errors in the log.

Thank you very much !

hanoii’s picture

Title: SQL syntax error on uc_out_of_stock.module » Document to exclude uc_out_of_stock/query from robots.txt
Component: Code » Documentation
Category: bug » task

Interesting, I wonder why google queries that URL. It might be good to limit it on robots.txt