Okay
  Public Ticket #3078062
Website crashes after updated
Closed

Comments

  •  1
    Goran started the conversation

    Hello, I have read through a similar issue to mine here: https://tmsplugins.ticksy.com/ticket/2751191/. The only difference is that my source sheets are google sheets.

    I have existing tables I created two years ago, and now when I go into some of them and do any edits and click save I have the same Parsererror, and after I add header names I get the same critical error crashing the site.

    It seems unacceptable to me that something which caused no issue previously now crashes the whole site. How can I update the header names so that I can continue using my tables?

    Thanks.

  •  2,572
    Aleksandar replied

    Hello Goran

    Having a column that doesn't have a header always caused a problem with at least one segment of the plugin, but we've included this message quite some time ago. When did you update the plugin if this only started happening?

    As mentioned in the other ticket:

    To revert the behavior, please go to file wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php and on line 635 you will find this:

    try {
                foreach ($dataSourceColumnsHeaders as $dataSourceColumnsHeader)
                    if ($dataSourceColumnsHeader == '') throw new WDTException(__('One or more columns doesn\'t have a header. Please enter headers for all columns in order to proceed.'));
            } catch (WDTException $exception) {
                die($exception);
            }

    Comment those lines, like this:

    //        try {
    //            foreach ($dataSourceColumnsHeaders as $dataSourceColumnsHeader)
    //                if ($dataSourceColumnsHeader == '') throw new WDTException(__('One or more columns doesn\'t have a header. Please enter headers for all columns in order to proceed.'));
    //        } catch (WDTException $exception) {
    //            die($exception);
    //        }
    

    And it should work as it used to.

    However, we will not revert this to an earlier state, so either modify the files used to generate the table so every column contains a header, or comment these lines of code each time the plugin is updated.

    Column headers need to be saved in the database, and having an empty header will cause issues with the plugin (sorting, filtering, search, conditional formatting, foreign keys, etc), so it's safer to simply add the column headers to all your columns.

    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

  •  1
    Goran replied

    Hi Aleksander, 

    The plugin was updated regularly, but the table from an earlier version was not edited until a few days ago.

    Hitting save on an existing table that was previously working fine results in the parse error (or 'warning' if you prefer). After this, adding the column headers to all our columns as you have suggested, results in a critical error.

    Editing code after every update is not realistic for us, so please instruct how to "modify the files used to generate the table so every column contains a header" without crashing the site.


    Thank you.

  •  2,572
    Aleksandar replied

    Hi again Goran

    Can you please send me the file that's used for generating the table along with admin wp-admin credentials, and the ID of the table? Just make sure to enable the "PRIVATE" response.

    Also, I'll need access to your database, to see how the table is structured, so please provide me with phpMyAdmin or cPanel credentials also.

    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