The Visitor Info module is cool, thanks.

I have noticed that on one site it works great but on another the markers do not show on the map. I found this error in my log.

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 'LEFT JOIN support_ticket st ON n.nid = st.nid WHERE ( (st.client IN (1,2) OR st' at line 1 query: SELECT DISTINCT * FROM visitorinfo order by csid desc LEFT JOIN support_ticket st ON n.nid = st.nid WHERE ( (st.client IN (1,2) OR st.client IS NULL)) LIMIT 0, 200 in /path_to_account/public_html/sites/all/modules/visitorinfo/visitorinfo.module on line 104.

I am not sure if this relates directly to the problem I am experiencing?
And whether this is a problem with the Visitor info module or the Support module http://drupal.org/project/support

Any help would be appreciated. Thanks,

Izzy

CommentFileSizeAuthor
#1 691758-db_rewrite_sql_args.patch855 bytesxurizaemon

Comments

xurizaemon’s picture

Title: Possible conflict Visitor info module and support module » Visitor info module db_rewrite_sql() args cause rewriting by other modules
Status: Active » Needs review
StatusFileSize
new855 bytes

db_rewrite_sql() needs a couple more arguments before it will know that you aren't rewriting a node table query. Otherwise modules handling regular nodes will (correctly|mistakenly) rewrite your SQL.

This patch oughta fix it, but I haven't got either of those modules installed, so ... here's hoping it's good :)

If not, please supply the correct args to db_rewrite_sql() when calling it in visitorinfo_get_points().

bwv’s picture

xurizaemon, your patch solved my problem here:

http://drupal.org/node/687602

thank you very much!

izmeez’s picture

Status: Needs review » Reviewed & tested by the community

@xurizaemon Patch in #1 solves my problem also. Thanks very much.

Is it really true that the website has had visitors from all these places? :-)

If it is okay, I will change the status to RTBC and keep my eyes open for conflicts if any appear.

Thanks,

Izzy

klonos’s picture

I've noticed there is no dev version of this module, so I guess this is not included in the latest 1.3. Is it?

If not can you please make sure it does? Thanx in advance.

izmeez’s picture

I can confirm that it is not in version 6.x-1.3 so you will need to apply the patch or wait for the next release. I think the feedback that the patch is working to solve the issue will help it get committed.

klonos’s picture

I did apply it and it did solve the issue. The error doesn't come up any more.

Thanks.

twooten’s picture

Hi,

So sorry for the delay in getting these issues cleaned up. Thank you all for the work in solving these and other issues. Will do my best to get a new release out very soon.

Tim

gregrmay’s picture

Wow! The patch in #1 worked like a charm, though my error message was slightly different.

Also, a note in case it helps anyone. I was using the Domain Access module, along with the Domain Bonus to enable GMap support for multiple domains. My primary domain was not getting this error, but my others were.

twooten’s picture

Status: Reviewed & tested by the community » Fixed

Included in 6.x-1.4.

Thanks!

klonos’s picture

Version: 6.x-1.3 » 6.x-1.4

I had no issue with the module in 1.3, but today I upgraded to 1.4 and I got it...

user warning: 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 'WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) LIMIT 0, 200' at line 1 query: SELECT * FROM visitorinfo order by csid desc WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) LIMIT 0, 200 in /var/www/larisa247/sites/all/modules/visitorinfo/visitorinfo.module on line 109.

I repeat... this is after upgrading to 1.4. I never had this issue with 1.3

klonos’s picture

Status: Fixed » Active
rar9’s picture

the Patch from Post #1

helped me.... Markes are now displaying again.

Thanks

twooten’s picture

I just released a development snapshot - 6.x-1.x-dev which includes the patch from #1. Please test.

xurizaemon’s picture

Thanks Twooten.

FYI, this patch was submitted while researching for a presentation at Drupal South 2010 - the presentation notes are at http://www.giantrobot.co.nz/blog/doesnt-play-nicely-drupalsouth-wellingt... if you're interested.

(There's no specific mention of this issue there, but I was doing some research on Drupal module conflicts at the time; the topic may interest you or one of the others reading this.)

</shameless_plug>

izmeez’s picture

Version: 6.x-1.4 » 6.x-1.x-dev

@twooten I skipped ahead and installed the new dev version and it works as expected.
Only minor problem was the table did not display any data until I went into the Visitorinfo config and clicked on save settings. Then everything was there.

Thanks,

Izzy

twooten’s picture

Thanks Izmeez, I tried to reproduce the problem on another site but was unable to.

RoiDanton’s picture

FYI:
I had the described error in my 6.x-1.4 installation and the patch could not help me.
It was rejected.
I upgraded now to the dev Version an the error is gone.

I hope this helps you with your good work!

izmeez’s picture

Can this issue status be changed to fixed or closed? It was committed to the dev release on 2010-Mar28 and would be in the current release 6.x-1.5

Thanks,

Izzy

twooten’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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