• Resolved HannsG

    (@hannsg)


    Hi Tobias,

    I’ve been looking at your Automatic Periodic Table Import extension as a possible solution for keeping several tables up-to-date.

    It looks a great but I noticed that when it couldn’t find the file (I had temporarily removed it from the server) it caused errors in the website table.

    In the event of the importer not being able to find a file (e.g. deleted or server down) would it be possible for it to recognise this and not attempt to import data that isn’t available at that point in time? E.g. just leave the existing data in place?

    I appreciate this probably isn’t a trivial update, but it would help make the target websites more robust if I end up using your TablePress plugin to power the tables.

    Many thanks 🙂

    https://wordpress.org/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Just to be sure: Are you referring to the “URL” import source, or to the “server” import source.
    For the latter, TablePress actually uses the PHP function is_readable() to see if the fle is available and only then tries an import.
    For the first case (“URL”), TablePress uses the WordPress wp_remote_fopen() function and has to rely on that. So, in this case, it might come down to whether your server sends proper HTTP status codes (like “404 Not found”) in this case, as that’s what this WordPress function can use.

    Regards,
    Tobias

    Thread Starter HannsG

    (@hannsg)

    Perfect, thanks for the explanation.

    Yes, I was using the URL import option, so that will have been the problem. I will switch to server import source.

    Thanks again 🙂

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, if the file is on the same server, then that should be the easiest and most reliable here.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Automatic Periodic Table Import – Behavior for Failed Imports’ is closed to new replies.