ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SQL Bug produced by EE Core

December 05, 2012 10:15am

Subscribe [2]
  • #1 / Dec 05, 2012 10:15am

    intunet

    46 posts

    Don’t know why I can’t post a support ticket directly but well….

    {exp:channel:entries channel="courses" search:course_category="Distant Learning" search:course_type="not Massage Course" orderby="title" sort="asc"}

    Creates this SQL error

    <pre><code>Error Number: 1054

    Unknown column ‘wd.field_id_77NOT’ in ‘where clause’

    SELECT t.entry_id FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !=’’ AND t.site_id IN (‘1’) AND t.entry_date <  354719796 AND (t.expirati OR t.expiration_date > 1354719796) AND t.channel_id = ‘3’ AND t.status = ‘open’ AND ( (wd.site_id=1 AND wd.field_id_47 LIKE “

  • #2 / Dec 05, 2012 10:17am

    intunet

    46 posts

    Wow… well in addition to this forum taking several minutes to post a page, it also doesn’t post correctly….....

    The preview looked perfect…....

     

  • #3 / Dec 05, 2012 10:19am

    MadWebDesigns

    147 posts

    Hi intunet,

    This error is usually related to an unknown db field name. Check the search:...=”” parameter field names to make sure they are correct. I hope this helps.

    Mike

  • #4 / Dec 05, 2012 10:20am

    intunet

    46 posts

    Well you can see what it is doing anyway, the query doesn’t have a space before the NOT so it adds it to the end of the field id.

  • #5 / Dec 05, 2012 10:29am

    MadWebDesigns

    147 posts

    [Edit]
    Oh, didn’t even see that. The query error info is all white on white on my screen. Try adding a space before the “NOT” so something like this:

    {exp:channel:entries… search:course_type=" not ..." ...}

    See if that solves it for you.

    P.S.: What version of EE are you running?

    Mike

  • #6 / Dec 05, 2012 10:48am

    intunet

    46 posts

    2.5.3

    I fixed it by replacing the “not
    with the list of all the other conditions so the same query done with OR instead.

    I figured I could probably hack around it but its a bug with the Core of EE so I thought I should post a bug report here since the support ticket thing isn’t working 😉

  • #7 / Dec 05, 2012 1:57pm

    MadWebDesigns

    147 posts

    Wow, does anything work properly in EE 2.5.3? I’m seeing all sorts of crazy bugs being posted by users.

  • #8 / Dec 06, 2012 4:17am

    intunet

    46 posts

    Does seem like the QA slipped a bit with this version to be honest yes.

    Seems like once you’ve found a working solution, its pretty reliable, its just getting there that is the problem!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases