Okay
  Public Ticket #3662028
Table not loading on mobile
Closed

Comments

  • Jeff started the conversation

    The table loads on desktop, but on mobile it does not load (tried using Safari and Chrome). On mobile the table appears greyed out, but the spinning loading wheel never resolves into the fully loaded table. I did have the table working on mobile about a week ago before this started happening.

  •  1,846
    Miloš replied



    Hi Jeff,

    I can see this is a Manual Table.

    This issue is not related to mobile devices, but rather, most probably, you can only see the table when logged in as Administrator.

    Can you try visiting the Page as non-logged user/incognito browser mode and check if you can see this "invalid JSON response" in the Browser console, with the 'spinning loader icon' in the center of the table.

    This is how it looks for us on desktop on any browser :

    2531271043.png

    This can be down to multiple factors, but you most probably have active caching on this Page, we will advise how you can resolve this.

    We currently have this issue which only happens for server-side processing tables when you have caching active on the page.

    Our developers are intensively working to resolve this issue, as soon as possible. I can't say an ETA on it, unfortunately.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    For the time being, the only two possible solutions will be:

    1.  To disable caching only for pages where you have the tables, or perhaps disable caching entirely, if possible.

    Most caching Plugins have the option to add URL's that will be excluded, so if possible, see if you can add the Pages with tables there, and that should solve it for now.


    2. Or you can try disabling the server-side processing option in your Table.

    For the Manual Tables, it is not possible to disable server-side processing;

    but as a workaround, you can make a new SQL Query based table from the same data which is stored in a Manual Table.

    Here are the steps if you wish to try that :

    First, check what is the MySQL Table name inside the Editing settings,

    7328050334.png

    then make an SQL Query like : 

     SELECT * FROM TableName  

    For any SQL Query based Table which has less than 2 thousand rows, you will be able to toggle server-side processing in the Data Source settings.

    5424981174.png

     If your SQL query based tables are not bigger than 2.000 rows, 

    you can disable server-side on SQL tables, and it will work like it does for Excel tables. ( loads all rows regardless of pagination)

    If you need to increase the row count while still having the "toggle" to disable server-side,

    Please go to ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around line 3188 you'll see this:

    if (is_array($res_dataRows) && count($res_dataRows) > 2000) {
    4647462986.png

    The lines of code can change during Updates because our Developers add new lines from time to time, so it is best to search for the line in any Code Editor with CTRL+F to get the right line.

    You can change the number 2000 to a value bigger than the number of rows in your table in order to still have that 'toggle option' for server-side processing.

    Another PHP file in this path :

    ../wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php

    In this file, please search for this, there should be two occurrences, first one around line 82 as :

    if (count($wpDataTable->getDataRows()) > 2000) {
    6921758130.png

    And second one around line 143:

    if (count($wpDataTable->getDataRows()) > 2000) {
    
    9764402593.png

    That will increase the server-side processing option automatic limit.

    We just advise caution not to increase that number 'too high' to avoid going over the limit what your Hosting Server's PHP Limitations can handle.

    Usually, up to around 5 to 6 thousand rows should pose no significant performance issues, but if you go higher than that data size without server-side processing, you could experience slow loading times.

    You can certainly test to see how a Table behaves on front-end, and if it loads too slow/or freezes the browser's Page, you can go back in the Table's Back-End and enable server-side processing for that Table.


    Let me know how it goes, maybe the easiest solution will be to exclude this page from caching and see if that resolves the issue.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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