received the following error when running cron.php
Type php
Date Wednesday, 16 July, 2008 - 20:45
User Abdul Rahim
Location http://panduan.org/cron.php
Referrer
Message 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 ')' at line 1 query: SELECT t.tid, t.vid FROM term_data t LEFT JOIN term_synonym s ON s.tid = t.tid WHERE(LOWER(t.name) IN ('seremban','seorang','pemain','bola','sepak','negeri','sembilan','cedera','ringan','apabila','kereta','yang','dinaikinya','terbabas','di','kilometer','227','6','lebuh','raya','air','keroh','dekat','sini','semalam') OR LOWER(s.name) IN ('seremban','seorang','pemain','bola','sepak','negeri','sembilan','cedera','ringan','apabila','kereta','yang','dinaikinya','terbabas','di','kilometer','227','6','lebuh','raya','air','keroh','dekat','sini','semalam')) AND vid IN () in /home/panduan/public_html/includes/database.mysql.inc on line 172.
Severity error
Hostname 202.75.42.21
there are few instances of the same type of error
Comments
Comment #1
rajaiskandarshah commentedadded and enabled cck content module
but still the same error when creating a new page content.
Comment #2
sdrycroft commentedI can see why the error is occurring. You have no vocabularies of type "multiple" that are marked as being associated with the content type of the node that is being searched. I'll sort a fix for this tomorrow.
Comment #3
rajaiskandarshah commentednoted. all my vocabularies are multiple. and i have now marked for all content types. but i still get the same error message.
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 ')' at line 1 query: SELECT t.tid, t.vid FROM term_data t LEFT JOIN term_synonym s ON s.tid = t.tid WHERE(LOWER(t.name) IN ('berita','malaysia','dan','indonesia') OR LOWER(s.name) IN ('berita','malaysia','dan','indonesia')) AND vid IN () in /home/panduan/public_html/includes/database.mysql.inc on line 172.
modules that i have are listed on:
http://panduan.org/Utama
thanks for the quick reply. by the way, this is a great module - i have been looking for something similar for the past 1 year.
Comment #4
fluxline commentedthe error that gets kicked off in the log is:
Message Invalid argument supplied for foreach() in path/modules/autotag/autotag.module on line 363.
Comment #5
sdrycroft commentedRaja, can you try the 1.9 release and see if that fixes your problem.
Comment #6
fluxline commentedi given 1.9 a go but still getting 9 of these errors:
Invalid argument supplied for foreach() in /path/modules/autotag/autotag.module on line 363. thrown when you save changes to the settings page.
must be one for each of the nodes that is being checked. and no terms are getting attached. can you confirm that in the settings area for content types to be evaluated; if the box has a check then the field is queried and tagged; if it does not have a check then it is ignored. i ask because the description above says 'fields to ignore' but the description below says uncheck. i was getting tags in a test install but with 'production' site with more modules i get nothing except some fields i thought were set to ignore. the ones i tried to query came back with nothing.
Comment #7
rajaiskandarshah commentedupdated to 1.9 release.
when i create a page type of content, tags were not added (eventhough i had written the content using terms that i had created in vocabularies). looking at the recent log entries - there were some errors :
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 in_array() [ error php 18/07/2008 - 09:21 in_array() [ error php 18/07/2008 - 09:21 Missing argument 1 for poll_form() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Missing argument 2 for image_form() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Missing argument 1 for image_form() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Missing argument 1 for book_form() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 in_array() [ error php 18/07/2008 - 09:21 in_array() [ error php 18/07/2008 - 09:21 Missing argument 1 for poll_form() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Invalid argument supplied for foreach() in ... Abdul Rahim
error php 18/07/2008 - 09:21 Missing argument 2 for image_form() in ... Abdul Rahim
there was also an error about the directory tmp not being writable. fixed that and ran cron.php. checked back recent log entries, and there were no errors.
created a page type of content. no errors were reported and the content was saved. however there were still no tags. there were also no errors on the recent log entries.
i have several questions:
1. is auto tagging supposed to happen during cron.php and when a content is created ?
2. what about content that is created from feed aggregation using leech ?
3. are the checkboxes in the autotag settings supposed to be checked or empty ? mine is all empty.
Comment #8
rajaiskandarshah commentedsome more quick notes.
on the autotag settings, i have checked for title of page. then created a page.
the page is saved but no tags.
in the recent log entries before saving of the page, there were a number of errors some of them relating to polls, images and forum (which i do not use on my site) - do i need to have the checkboxes in autotag settings checked (with a tick) or unchecked (with no tick) ?
examples of errors received:
in_array() [function.in-array]: Wrong datatype for second argument in /home/panduan/public_html/modules/autotag/autotag.module on line 372.
Invalid argument supplied for foreach() in /home/panduan/public_html/modules/autotag/autotag.module on line 363.
Missing argument 1 for poll_form() in /home/panduan/public_html/modules/poll/poll.module on line 118.
thanks for your patience. this is a great module, soon as you can fix the bugs, i think this will be very popular. i am already thinking of defining geo location tags. this would be very interesting to track events like earthquakes that are happening around the world as reported in the news.
i am not in favor of using yahoo term extraction, coz the tags returned are worthless for non-english terms. or for sites that are focused on certain topics which need to have its own terms (think chemistry)
Comment #9
rajaiskandarshah commentednarrowed down the errors.
the errors only happen when saving the autotag settings.
Comment #10
sdrycroft commentedWhen editing a node, do you see a "Submit" button, or a "Next" button? If you're seeing a "Submit" button, then your taxonomy is not set up correctly. You need to do the following:
You do not need to change any settings on the autotag settings page, in fact, by blindly ticking the boxes you're actually restricting how autotag works, and not enabling it to work better.
Comment #11
fluxline commentedyou are correct, when a node has submit instead of a next then it does not work on that content type. why is this? thanks for that troubleshooting tip.
so i followed the advice above:
-recreated a content type
-created a new vocab with the settings above and selected new content type as associated type
-populated vocab with new terms that will be in new content
- created some content with terms in vocab
-autotag settings, only selected the new content type to autotag (yes, i know what you said above. just testing)
- saved settings
-ran cron
Results:
-as advertised, content was tagged with terms from new vocab
-additional bonus tags from old vocab terms that were not selected as associated with the new content type
-error in log: Invalid argument supplied for foreach() in path/modules/autotag/autotag.module on line 363.
maybe you could explain a bit about the not changing the settings and how it improves things. i would think i would be able to restrict the content types i would want to autotag. spent some time going through your code (excellent commenting thanks!) but not coming from the php world, i'm a bit illiterate at the moment.
once i understand how this works, i will set up some documentation if it will help.
Comment #12
rajaiskandarshah commentededited the vocabularies so that it is NOT freetagging.
created new content page comprising of words contained in the vocabulary. the button next is displayed at the bottom of the page. clicking on next, displays a screen of tags identified for the content (correctly) and the option to add any other tag. clicking on the submit button posts the content.
however, i get these errors on the page after posting the content:
* user warning: Duplicate entry '18-102048' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (102048, 18) in /home/panduan/public_html/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '71-102048' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (102048, 71) in /home/panduan/public_html/includes/database.mysql.inc on line 172.
no other errors noted on the recent log entries.
this is really great, especially for non-english language sites.
Comment #13
rajaiskandarshah commentedover the weekend, i noted that my previous content were not being autotagged.
did a little experimenting, and found out that in autotag setting, the checkbox for the content type needs to have a check (tick) for it to be autotagged.
also noted that if the node has already been tagged, then autotag will will display an error message:
warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/panduan/public_html/modules/autotag/autotag.module on line 150.
and after clicking on the submit button, then the additional tags are added but another error message is displayed:
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/panduan/public_html/modules/autotag/autotag.module on line 150.
* user warning: Duplicate entry '71-102282' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (102282, 71) in /home/panduan/public_html/includes/database.mysql.inc on line 172.
Comment #14
sdrycroft commentedApologies, but I'm marking this as "won't fix". We're currently pushing all our modules up to D6, and won't be fixing any D5 bugs (unless major). D5 is no longer a supported release.
Comment #15
kenorb commentedThe same problem on 6.x:
#361509: Duplicate entry for taxonomy SQL query
Comment #16
brianbrown commentedCrappy module!