Okay
  Public Ticket #1696773
WpDataTables
Closed

Comments

  •  1
    ogstsic started the conversation

    We are preparing to apply update to your version 2.3 and found these problems.   

     We found that version 2.2.1 is installed but it was patched as it should have s descrbed in ticket 1334956 you recommended several patches on November 21, 2017 at 12:04pm and November 16, 2017 at 5:51pm

     WE plan to apply the patches to 2.2.1 before we upgrade to 2.3 but found some problems

     Some of the suggested changes have different code in the current plugin than described in the ticket.

     The modules that have changed are:

     wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php around line 102

     supposed to be:

    foreach ($tableData->columns as &$column) {

              $column->defaultValueValues = $wpDataTable->getColumn($column->orig_header)->getDefaultValues();

    }

     

    changed to:

     

    // Return Filter and Editing Default value when Foreign key is set

    foreach ($tableData->columns as $column) {

        if (!empty($column->foreignKeyRule)) {

            $column->filterDefaultValue = $wpDataTable->getColumn($column->orig_header)->getFilterDefaultValue();

            $column->editingDefaultValue = $wpDataTable->getColumn($column->orig_header)->getEditingDefaultValue();

        }

    }

     

    wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php around line 60

     

    supposed to be:

    foreach ($tableData->columns as &$column) {

       $column->defaultValueValues = $wpDataTable->getColumn($column->orig_header)->getDefaultValues();

    }

     

    changed to

     

    // Return Filter and Editing Default value when Foreign key is set

          foreach ($tableData->columns as $column) {

              if (!empty($column->foreignKeyRule)) {

                  $column->filterDefaultValue = $wpDataTable->getColumn($column->orig_header)->getFilterDefaultValue();

                  $column->editingDefaultValue = $wpDataTable->getColumn($column->orig_header)->getEditingDefaultValue();

              }

          }

     

    wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js around line 1030

     

    supposed to be:

    for (var i in tableDescription.advancedEditingOptions.aoColumns) {

        var defaultValue = tableDescription.advancedEditingOptions.aoColumns[i].defaultValue;

        var editorInputType = tableDescription.advancedEditingOptions.aoColumns[i].editorInputType;

        if (defaultValue) { if ($.inArray(editorInputType, ['selectbox', 'multi-selectbox']) !== -1) {

                defaultValue = editorInputType == 'multi-selectbox' ? defaultValue.split('|') : defaultValue;

                $('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq(' + i + ')').selectpicker('val', defaultValue);

            } else { $('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq(' + i + ')').val(defaultValue);

            }

        }

    }

     

    now at 1122 and significantly different and a bigger for loop

     

    Should we still apply the recommended patches. 

  •  1,708
    Miloš replied

    Hi ogstsic,
    Thank you for your purchase.

    Yes those changes are included in the 2.3 version of our plugin so you should not have any issues after the update.


    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [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