Okay
  Public Ticket #2533303
Shortcode causing fatal error
Closed

Comments

  • Srikanth Meenakshi started the conversation

    When I embed a wpdatatables shortcode in an elementor page, it causes a fatal error. Here's the stacktrace from log file:


    [09-Sep-2020 05:56:20 UTC] PHP Notice:  Undefined index:  in /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 1042

    [09-Sep-2020 05:56:20 UTC] PHP Notice:  Undefined index:  in /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 339

    [09-Sep-2020 05:56:20 UTC] PHP Notice:  Undefined index:  in /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 340

    [09-Sep-2020 05:56:20 UTC] PHP Fatal error:  Uncaught Error: Call to a member function setFilterType() on bool in /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php:3031

    Stack trace:

    #0 /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php(3008): WPDataTable->prepareRenderingRules()

    #1 /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/controllers/wdt_functions.php(587): WPDataTable->fillFromData()

    #2 /var/www/primeinvestor.in/htdocs/wp-includes/shortcodes.php(343): wdtWpDataTableShortcodeHandler()

    #3 [internal function]: do_shortcode_tag()

    #4 /var/www/primeinvestor.in/htdocs/wp-includes/shortcodes.php(218): preg_replace_callback()

    #5 /var/www/primeinvestor.in/htdocs/wp-includes/class-wp-hook.php(287): do_shortcode()

    #6 /var/www/primeinvestor.in/htdocs/wp-includes/plugin.php(206): WP_Hook->apply_filters()

    #7 /var/www/primeinvestor.in/htdocs/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1683): apply_filters()

    #8 /var/www/primeinvestor.in/h in /var/www/primeinvestor.in/htdocs/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 3031


  • Srikanth Meenakshi replied

    This is happening with regular Gutenberg editor as well. After this happens, the page becomes unusable and I have to trash the page and start over again, even to test.

  • Srikanth Meenakshi replied

    OK, narrowing down, this is happening just with one table though. The others seem fine (although I am having other issues with those tables). Can you tell me what could cause a fatal error in a table? Something about column definition?

  • Srikanth Meenakshi replied

    To add to my woes, I can't even go into the table configuration of this table - it's throwing the same fatal error.

  • Srikanth Meenakshi replied

    Ok, the Fatal error problem is solved. The issue was I had edited the csv file to add a column name in place of an empty column name. Wish Wpdatatables was a little more graceful about this failure. But I updated it and it's find now.

  •  2,572
    Aleksandar replied

    Hello Srikanth

    Thanks for letting us know the issue is resolved.

    For future reference, this limitation goes for all tables linked to an existing data source, except for SQL query based tables.

    You can see it in our documentation:

    Please note: Once you create a table from a CSV file, changes in this file like:

    • Changing the column’s name,
    • Changing the column’s order,
    • Deleting the column, and
    • Adding a new column.

    are highly not recommended, because the table in the wpDataTable plugin will not work, at the moment. If you make any of these changes, please recreate the table again.

    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

  • Suckerpunch replied

    It would be great if this error failed gracefully instead of locking up the edit screen for both that table and for any pages that the table is embedded on.

  •  2,572
    Aleksandar replied

    I agree with you, Lee

    Unfortunately, we haven't been able to make that possible up until now. Our developers will be working on it in the future, though.

    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