Okay
  Public Ticket #1630783
problem in data filtering
Closed

Comments

  • manfulsurefire started the conversation

    Hello Team,

    We have used WP Datatable in our site for showing some information.  but its filter is not working with single quote(').  For example on this page https://franchisedisclosuredocuments.net/search-fdds/188-fine-mens-salon-fdd/ , we set title "18/8 Fine Men's Salon" for filtration. But it didn't show any result on page load (http://prntscr.com/k2gdkq). But when you research with same text "18/8 Fine Men's Salon" . It return result (http://prntscr.com/k2gdyw).  I am using this [wpdatatable id=1 VAR1="18/8 Fine Men's Salon" /] shortcode on same page. Please check and suggest solution.

    Thank You

  •  394
    Milan replied

    Hi manfulsurefire,
    Thank you for your purchase.

    Can you try to insert \ before the apostrophe like this "18/8 Fine Men\'s Salon". Do the same in VAR1 input field and also in shortcode and let me know is it working.

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hi Milan ,

    I tried with this [wpdatatable id=1 VAR1="18/8 Fine Men\'s Salon" /] . But it still not working.

    Thank You

  •  394
    Milan replied

    Hi manfulsurefire,

    Can you please tell me did you insert that string also in input for VAR1 placeholder.(attachment)

    Attached files:  Screen Shot 2018-07-05 at 11.24.44.png

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hi Milan,

    We are using something else for placeholder (http://prntscr.com/k38whc). I also use  18/8 Fine Men\'s Salon in place holder but still it was not working. 

    Thank you

  •  394
    Milan replied

    Hi manfulsurefire,

    Sorry for late response. 

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

    Yes I reproduce it in our local environment. I will forward this to my team to investigate and figure out what cause the issue and fix it for next update. Thank you for reporting this.

    Best regards.

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hi Milan,

    Thanks for the response. Please try to solve this issue ASAP.

    Thank You

  •  394
    Milan replied

    Hi manfulsurefire,

    We will try to be as soon as possible. Thank you for your patience.

    Best regards.

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hi Milan,

    Do you find any solution ?

    Thank You

  •  394
    Milan replied

    Hi manfulsurefire,

    Yes there is quick fix that I can send you if you want, but we are still testing to check out is everything is working fine.

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hi Milan,

    Yes, Please send it to me.

  •  394
    Milan replied

    Hi manfulsurefire,

    In file wp-content/plugins/wpdatatables/source/class.wdttools.php around line 113 you will find this code:

    // Shortcode VAR1
    if (strpos($string, '%VAR1%') !== false) {    $string = str_replace('%VAR1%', $wdtVar1, $string);
    }
    // Shortcode VAR2
    if (strpos($string, '%VAR2%') !== false) {    $string = str_replace('%VAR2%', $wdtVar2, $string);
    }
    // Shortcode VAR3
    if (strpos($string, '%VAR3%') !== false) {    $string = str_replace('%VAR3%', $wdtVar3, $string);
    }

    and you have to replace it with this one:

    // Shortcode VAR1
    if (strpos($string, '%VAR1%') !== false) {    $string = str_replace('%VAR1%', addslashes($wdtVar1), $string);
    }
    // Shortcode VAR2
    if (strpos($string, '%VAR2%') !== false) {    $string = str_replace('%VAR2%', addslashes($wdtVar2), $string);
    }
    // Shortcode VAR3
    if (strpos($string, '%VAR3%') !== false) {    $string = str_replace('%VAR3%', addslashes($wdtVar3), $string);
    }

    Now you can insert in short code [wpdatatable id=1 VAR1="18/8 Fine Men's Salon" ] and filtering will work properly. This will be included in next update so you don't have to worry about changing code again.

    Best regards

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net

  • manfulsurefire replied

    Hello Milan ,

    Thank you for  your response. This code is working for me. I have an another issue with this plugin , table load very slowly . Please check  https://franchiseresearch.net/search-fdds/ https://franchisedisclosuredocuments.net/  and provide me any solution.

    Thank You

  •  394
    Milan replied

    Hi manfulsurefire,

    I am glad that is working fine.

    About the second question:

    When you have questions or issues which are not related to the title of the active ticket can you please open a new one and we will help you there. In that way, issues and questions which are related to different subjects will be in different tickets so other customers can find it easily. Our policy is to have one issue or question per ticket because of the reasons that is describe already.

    Thank you for understanding.

    Check out our documentation for Amelia - WordPress booking plugin on this link.

    Check out our documentation for wpDataTables - WordPress table plugin on this link.

    Kind Regards,
    MIlan Jovanovic
    milan.jovanovic@touchmesoft.net