Okay
  Public Ticket #1237411
Admin bug after update
Closed

Comments

  • brunoconceito started the conversation

    Take a look at my screen after the update.

    The list of tables are OK, but the settings page is buggy.

  • [deleted] replied

    Hi Bruno,

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check PRIVATE so nobody can see it except us.


  • brunoconceito replied

    Milos, I found the initial problem. I created a translation and put it on /languages/plugins/ folder. It's not completed translated yet, but when I removed the translation files the problem was gone.

    I'm sending it, so you could try in your local environment.

    Do you still need to access my admin?

  • brunoconceito replied

    I'm sending for your know. 

    The number of rows dropdown do not have the "All" string translated. In portuguese this should be "Todos".

    http://conceito-online.com.br/clientes/abic/site/certificacao/pureza/marcas-autorizadas/

  • [deleted] replied

    Hi Bruno,

    As I understand you, when you upload files .po and .mo in /languages/plugins/ settings page starts to be buggy?

    To translate "All" to "Todos" please go to ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php find:

    $obj->dataTableParams->aLengthMenu = json_decode('[[10,25,50,100,-1],[10,25,50,100,"All"]]');

    and replace it with:

    $obj->dataTableParams->aLengthMenu = json_decode('[[10,25,50,100,-1],[10,25,50,100,"Todos"]]');


  • brunoconceito replied

    Yes, you got it right.

    hummm I'll not touch on plugin's code. Couldn't you provide a filter? Would be perfect!

  • [deleted] replied

    Hi Bruno,

    1. About translation issue - Did you try to upload .po and .mo files in ../wp-content/plugins/wpdatatables/languages folder of the plugin, and not to the WordPress langues/plugins folder?

    2. You can use this filter to change translation of this dropdown:

    wpdatatables_filter_table_description( $object,  $tableId )

    This filter is applied to an object (PHP’s StdObj), which is later printed as a table’s data attribute (json_encoded), and used to initialize the DataTables instance, and to describe other table settings and parameters that are used by the frontend JS library.

    $object is the PHP StdObj which contains all the necessary fields for initializing the table

    $tableId is the table identifier from the MySQL table (wp_wpdatatables)


  • brunoconceito replied

    Oh yes. The filter works just fine.

    I moved the translation files to wpdatatables/languages/pt_BR folder, but without effect. :-(

  • [deleted] replied

    Hi Bruno,

    About translation files:

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check PRIVATE so nobody can see it except us.