Okay
  Public Ticket #2934415
Tables don't work
Closed

Comments

  • Stephen started the conversation

    Tables work on my staging site, but don't work on the live site when I publish. Getting a rendering error.

  • Stephen replied

    Additional information. This is the error I get. 

    Error
    Your requested sheet index: -1 is out of bounds. The actual number of sheets is 0. 


    Also, the Columns list button does nothing on the live site. Gives me an error. Works fine on the test site. I purchased an additional license to make sure that wasn't the cause. Both plugins are activated. 


    Thanks

  • [deleted] replied

    Hi Stephen

    Thank you for reaching out to us. 

    I'm not sure I understand what index you're referring to. Can you please tell us if you recently migrated domains?

    When you are moving to the live site from local or stage site we can suggest using the Duplicator plugin. We use it and it's working fine, because it will transfer all the files and also the tables to database. 

    Keep in mind we are using WordPress function wp_upload_dir() for location of upload files. By default is set to the upload folder (wp-content/uploads) - it's not a relative path.

  • Stephen replied

    Blazenka, 


    Haven't had this issue before with going from a staging environment to live production. Our sites are hosted on WPEngine, so it's pretty robust in that regard. Here is the page on the production site that is failing on load: https://preparedness.cste.org/?page_id=132.  Here is the page on our staging site which loads correctly: https://stagingprep.wpengine.com/?page_id=132.  I even tried to recreate the table on the projection site from scratch and I was still getting an error. Both sites have activated and updated plugins as indicated previously. Purchased an additional license to be sure. Let me know your thoughts. 


    Thanks, 

    Stephen

  • [deleted] replied

    Hi Stephen

    Can you please provide us with a temporary WP-admin (administrator) user 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 parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.

  •   Stephen replied privately
  • [deleted] replied

    Hi Stephen

    If I am not mistaken, these are all tables linked an Excel file? I can see you have a few that work, one is manual table and I assume the other one is newly created Excel table and it has this path https://preparedness.cste.org/wp-content/uploads/2021/12/CSTE-COVID-19-Response-Webinar-Info-6.xlsx

    Please check the "content" row of the wp_wpdatatables table and if it doesn't match your live domain, you will need to change the path for the files. As mentioned before we are using WordPress function wp_upload_dir() for location of upload files. By default is set to the upload folder (wp-content/uploads) - it's not a relative path.

  • Stephen replied

    Blazenka, 


    The problem is, I can't even access those settings on the live site. It doesn't seem to be a simple path issue. Even when I try to recreate, I get the same errors on the live site. How should I proceed to remedy? 


    Thanks, 

    Stephen 

  •   Aleksandar replied privately
  • Stephen replied

    Thank you Aleksandar, 


    What should I do in the future as far as this setup? We do all our development and testing on a dev site and push the files to the production site. We also overwrite the databases in the process to keep it all clean. 


    Thanks, 

    Stephen 

  •  2,572
    Aleksandar replied

    Hi again Stephen

    I don't know what you're using for the migration, but using the Duplicator plugin should bypass this issue. 

    It will transfer all the files and also the tables to the database, but if you face the issue again, all you need to do is modify a couple of columns in the database using this MySQL query:

    UPDATE `new_prefix_wpdatatables` SET content=REPLACE(content,'old_prefix_','new_prefix_')

    Just make sure to replace "new_prefix_" and the "old_prefix_" with actual prefixes of your database tables.

    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