• Resolved chiaraarmbruster

    (@chiaraarmbruster)


    hello Peter,

    i wonder if you changed something with the wpdadiehard Shortcodes?
    My shortcodes worked fine, but now the filter doesn’t work anymore.

    My used short code, which doesn’t work anymore:
    [wpdadiehard schema_name=”mydatabase” table_name=”view_name” filter_field_name=”my_id” filter_field_value=”14″ title=”title of table”]

    when I only use: [wpdadiehard schema_name=”mydatabase” table_name=”view_name” title=”title of table”]
    without the filter, everything works fine.

    My fieldname is also correct and in the backend of my database i see that there are rows with the id of 14. so i don’t know why the filter doesn’t work anymore.

    I did not change anything in the database itself, and it worked some months ago perfectly.

    Do you have any idea what is going wrong here?

    Thank you!
    Chiara

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

    (@peterschulznl)

    Hi Chiara,

    I don’t think there were any changes which affected this area. The arguments are working correctly on my installation.

    What output are you getting from this shortcode? What happens if you put a filter on a text column?

    Thanks,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Hello Peter,

    a filter on a text column also doesn’t work.
    The output is the table without any entries. So I see all columns and title of the table but it says “no data found”.

    I’m sure I entered the correct column-name and filter-value.

    Do you have any more ideas?
    The table i want to filter is a view in my sql-database. But i don’t think that this is the problem.

    Thanks
    Chiara

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Chiara,

    Are there any other filters on your table? Maybe you can debug the code to see what is added to your where clause?

    If debugging is not possible, you can just add a temporary message to display the query which is being performed. Presuming you have version 4 installed:
    – Look for file WPDA_List_Table.php
    – Go to line 2147
    – Add:
    var_dump($query);
    or
    echo $query;

    What query do you get?

    Thanks,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Hello Peter

    the echo shows

    select *, ” as wpda_hyperlink_0 from susmagpro.view_sus_magnets_to_eol_magnet eol_id like ’14’ limit 10

    isn’t there missing the WHERE?

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    select *, '' as wpda_hyperlink_0 from susmagpro.view_sus_magnets_to_eol_magnet eol_id like '14' limit 10

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Chiara,

    Strange! This works for me. I added a hyperlink as well, and it continuous to work.

    Do you have a search filter installed? Or other external code? If so, what happens if you disable it?

    Thanks,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Hey Peter,

    i’ve tried several different tables and views and nothing works with the filter.
    I dont think i have installed a search filter or external code at this point.

    To test the shortcode i just added a new page in wordpress and entered the shortcode. There is no additional php or anything running there.

    The strange thing is, that it worked fine, when i implemented this some months ago. And now it isn’t working anymore.

    Thanks,
    Chiara

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Which version of the plugin are you using Chiara?

    Thanks,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Version 4.0.0
    Updated this morning.
    But it didn’t work before. There i had 3.5

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Does it work with version 4?

    Thanks,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    No. Unfortunately not.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Sorry Chiara! I have no clue. It works for me, with tables as well as views, with and without hyperlinks. Can you temporarily give me access to your server for further investigation?

    Best regards,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Hello Peter,

    no unfortunatly i can’t give you access due to confidentiality issues.

    Would it help if i send you my plugin-files, so that you can look for changes between mine and your version?
    Also I could include screenshots from the plugin settings or what else could help.

    Thank you very much.
    Chiara

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Chiara,

    >>> Would it help if i send you my plugin-files, so that you can look for changes between mine and your version?

    Yes!

    >>> Also I could include screenshots from the plugin settings or what else could help.

    Yes again! 🙂

    Please use the contactform on the plugin website if you want to send your files in private.

    Alternatively, you could also use the default where. Not sure if you are aware of this, as I see now that I forgot to add this feature to the documentation. It works similar as with the Data Publisher, which is documented here:
    https://wpdataaccess.com/docs/documentation/data-publisher/adding-filters/

    Make whatever choice best fits your needs.

    Best regards,
    Peter

    Thread Starter chiaraarmbruster

    (@chiaraarmbruster)

    Hello Peter,

    as I want to use the shortcodes, i thought there is no possiblity to use default where in them?

    I’ll send you the files and some screenshots in a sec.

    Thank you very much.
    Chiara

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

The topic ‘Filter on Shortcodes wpdadiehard’ is closed to new replies.