As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2481172
CURRENT_POST_ID Placeholder usage failure on Set Predefined value
Closed

Comments

  • Ozgur Kaya started the conversation

    Hi to all,

    I have purchased your product(wpdatatables v2.3) before. I bought the new version(v3.0.1), where I had a problem. However, the problem continues.

    I am tring to use your %CURRENT_POST_ID% placeholder in add/edit popup. It's working on frontend but there is a critical failure on dataTable. when I want to return back to the same wpdata table to edit I am getting this error and can't edit the table anymore and deleting the table and trying to do this again with an another way..

    1-Open column settings, 

    2-Click EDITING Tab, 

    3-Set Predefined value(s) as %CURRENT_POST_ID%.. 

    4- Save all and exit and come back again to table management for editing.. You can't access the WpDatatable anymore..

    ERROR MESSAGE on top of the admin screen:

     Trying to get property 'ID' of non-object in /var/www/html/wp-content/plugins/wpdatatables/source/class.wpdatacolumn.php on line 707

    Frontend side seems working, there is no problem. But it does not important without backend.

    Please fix this issue for me , otherwise you could cancel my subscription and take it back newly purchase of the same product again! Thanks.

  • Ozgur Kaya replied

    Change this line (wpdatacolumn.php on line 707) like this and add the sollowing function to your PHP file. It works.

    $value = str_replace('%CURRENT_POST_ID%', get_the_ID(), $value);

        public static function get_the_ID() {

            $post = get_post();

            return ! empty( $post ) ? $post->ID : false;

        }

  •  2,576
    Aleksandar replied

    Hello Ozgur

    Thank you for letting us know the issue is resolved.

    I have forwarded the ticket to our development team for review.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables