Okay
  Public Ticket #1681897
Filters not rendering with placeholder
Closed

Comments

  • hulabula started the conversation

    Hi

    Filters don't seem to render correctly when using a placeholder in the MySQL query.  

    The attached image shows the same page rendering a table correctly (green) without a placeholder AND a table marked in red is not rendering correctly but does use placeholders.

    NON-PLACEHOLDER QUERY filters render (green)

    SELECT wp_fl_agreements.foreign_agreement_name,
           wp_fl_agreements.foreign_agreement_num,
           wp_fl_agreements.foreign_publisher_agreement,
           wp_fl_agreements.foreign_agreement_term_start,
           wp_fl_agreements.foreign_agreement_term_end,
    FROM wp_fl_agreements
    

    PLACEHOLDER QUERY filter don't render (red)

    SELECT wp_fl_agreements.foreign_agreement_name,
           wp_fl_agreements.foreign_agreement_num,
           wp_fl_agreements.foreign_publisher_agreement,
           wp_fl_agreements.foreign_agreement_term_start,
           wp_fl_agreements.foreign_agreement_term_end,
    FROM wp_fl_agreements
    WHERE wp_fl_agreements.fl_client_agreements LIKE '%%CURRENT_POST_ID%%'
    

    I need to pull and render all the rows where the CURRENT_POST_ID is found in the fl_client_agreements column which is stored like so in the MySQL table, "[post_id,post_id,post_id]"

    I even tried a different query not using LIKE and the filters still won't render:

    SELECT wp_fl_agreements.foreign_agreement_name,
           wp_fl_agreements.foreign_agreement_num,
           wp_fl_agreements.foreign_publisher_agreement,
           wp_fl_agreements.foreign_agreement_term_start,
           wp_fl_agreements.foreign_agreement_term_end,
    FROM wp_fl_agreements
    WHERE LOCATE('%CURRENT_POST_ID%',wp_fl_agreements.fl_client_agreements)>0
    

    Thoughts?

    The preview in the backend does work :/

    Also, filters also do not render when you use "Filters in a form" above the table. 

  • hulabula replied

    This is the attachment showing that the form above also does not render the filters when using a placeholder.

  •  472
    Isidora replied

    Hi hulabula,
    Thank you for your purchase.

    Sorry for late response. 

    We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.

    I suppose that is related with way how is saved that values in database for that column wp_fl_agreements.fl_client_agreements. Did you try to replace placeholder %CURRENT_POST_ID% with actual value of post id and check do you have same issue?

    Best regards


    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables