• bmorg7

    (@bmorg7)


    Hello!

    I am running into an issue with the search builder with a data publisher. Sometimes I get an error and sometimes I do not.

    As I saw in a post a week ago I was having similar issues with trying to use “Between” for the datetime format, and instead split the dates into several columns. One for Year / Month / Day / Hour. Still wanted the Date time structure for visual and will use the columns for filtering, will eventually remove the UTC columns from the display and only use for filtering.

    If I do equals or any searches with the year / month I am ok.

    Most of the time when I do a “Between” with the UTC Day (Lets say 20 and 25 are the ranges) I get an SQL error.

    Image of page that includes table and error shown here.
    https://ibb.co/64NQPm2

    Any suggestions? The UTCDay is an INT. I have used the filtering a few times where it has worked, with no changes. But most of the time I get this error.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @bmorg7,

    Thanks for the detailed explanation!

    To see what’s going wrong, you can trace your queries. Please go to plugin settings and enabled deug mode (on the first tab). Open the inspector in your browser and activate tab network. Filter on: admin-ajax.php

    Each time you run a query, the request is shown in the inspector. Click on a failing request, open tab Preview and open the debug node. That’s where you’ll find the failing query. Can you share one or two failing queries?

    Thanks,
    Peter

    Thread Starter bmorg7

    (@bmorg7)

    Thanks for your help Peter!

    I have enabled the debug mode.
    For the inspector is this the web browser inspector?

    Using Edge: (Three dots top right corner)
    More Tools > Developer Tools.

    Am I heading in the right direction to find the failed requests?

    Sorry! A bit inexperienced and still learning!

    EDIT: Believe I found what you were talking about. Have to get the error to happen again, has been working right now.

    • This reply was modified 4 years ago by bmorg7.
    Thread Starter bmorg7

    (@bmorg7)

    Was able to get SQL errors again in demo mode, but am struggling to find the mentioned inspector debugging to pass along the information

    Thread Starter bmorg7

    (@bmorg7)

    I’m beginning to think it may be an issue related to seeing the data entered in the fields. I get similar failures when I try running queries with the field entered values blank:

    When I do the search I have been entering a value, and hitting enter in the same box that values are entered in. Is there possibly a “Submit” button or such that I can use instead and see if this corrects it viewing the entered values?

    Often if it’s an indented OR statement, and I delete one of the conditions, and re add the exact same condition it will begin to work again. Debug might be able to tell us more when I’m able to see it. Sometimes if I enter values in one box and it fails, if I click on another box and hit enter to try again it will start working.

    • This reply was modified 4 years ago by bmorg7.
    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @bmorg7,

    Can you share a public URL? Or are you working on a local machine?

    If not, I hope this image helps:
    https://ibb.co/nfJptDF

    Please let me know,
    Peter

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @bmorg7,

    Further research has shown that the Search Builder is not always able to get the correct column name. Not sure if this is applicable to your use case, but the issue is fixed and will be available after the next update. Hope this help to solve your issue.

    Best regards,
    Peter

    Thread Starter bmorg7

    (@bmorg7)

    That image does help and I am able to view the queries! I think the issue you found may be the problem, and I look forward to the next update.

    The Data publisher has made my project so much easier and I really like having this tool.

    Thanks Peter!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Data Publisher – Condition’ is closed to new replies.