• Hello,

    Ok, so: I’m using eventcalendar3 for this site and for whatever reason, when I use it on the home page I get db errors for every other loop:

    https://dev.perspectivescs.org/

    here’s a page template that is identical to the index page:

    https://dev.perspectivescs.org/?page_id=134

    On all the inner pages I get no errors, but in index I do. If you click on on the calendar tab in the bottom right, that’s where the calendar is. Notice the calendar itself works. So what’s the deal? When I deactivate the calendar this page is fine, but when I strip out the calendar tag the page is still zonked.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You may have a conflicting plugin – similar to what is described here:
    https://www.ads-software.com/search/Column+%27category_id%27+in+where+clause+is+ambiguous?forums=1

    Thread Starter public_radio

    (@public_radio)

    I disabled all the other plugins, and I also tried taking every db call off the page except one and i’m still getting a db error. so it has to be something with event calendar 3 being used on the index page.

    Thread Starter public_radio

    (@public_radio)

    the newest event calendar 3 candidate release is bad. problem solved.

    Thread Starter public_radio

    (@public_radio)

    Sorry that the title of this is incorrect. It should be WordPress eventcalendar3 db error.

    So check it out:

    https://dev.perspectivescs.org/

    Works fine. Then you go to search results:

    https://dev.perspectivescs.org/?s=another

    and the errors are back. I’ve tried everything, even copying over the code so the two pages, index.php and search.php, are identical. and I still get these errors. This is related to the eventcalendar3 plugin. maybe the s in the string is the culprit? I have no idea but I’m pulling my hair out.

    Thread Starter public_radio

    (@public_radio)

    Ok so here’s the error:


    WordPress database error: [Column 'category_id' in where clause is ambiguous]
    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_post2cat ec3_post2cat ON ec3_post2cat.post_id=id LEFT JOIN wp_ec3_schedule ec3_sch ON ec3_sch.post_id=id AND ec3_sch.end>='2006-11-08 00:00:00' WHERE 1=1 AND (category_id = 3) AND post_date_gmt <= '2006-11-08 16:42:59' AND ((post_status = "static" or post_status = "publish") OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" AND (ec3_sch.post_id IS NOT NULL OR ec3_post2cat.category_id!=5) GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 10

    So the db request is including these:


    ec3_post2cat ON ec3_post2cat.post_id=id LEFT JOIN wp_ec3_schedule ec3_sch ON ec3_sch.post_id=id AND ec3_sch.end>='2006-11-08 00:00:00


    (ec3_sch.post_id IS NOT NULL OR ec3_post2cat.category_id!=5)

    and I don’t kno why it’s trying to include event calendar 3 (ec3) calls in there because these don’t pertain to the calendar at all.

    Thread Starter public_radio

    (@public_radio)

    ok guys, here’s what I’m going to do: In the case of the search results, I’m just going to hard query and pull the results. i’m trying to do that and I’m getting an error that says ‘unexpected T_STATIC’.

    here’s the query:


    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND (category_id = 3) AND ((post_status = "static" or post_status = "publish") OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 10

    So is there too much in this query? all I want to do is pull my posts based on a certain category. What can I do here?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress eventcalendar3 db error’ is closed to new replies.