Problems with table import, shortcode and caching

Hi - I’m using the table importer plugin to display tables on a page with a custom twig template. It’s been working until I last ran updates on Grav and all my plugins.

It seems to be linked to caching behavior as if I clear cache then the page renders, but then throws an error on reload.

The error is Call to a member function path() on null and points to TableImporterShortcode.php from the table importer plugin.

The twig code that I’m using is:

{% for list in page.header.cast_lists %}
  <h4>{{ list.name }}</h4>
  <p>{{ page.media[list.name].name }}</p>
  {{ "[ti file=#{list.file|first.name} header=false]"|shortcodes }}
{% endfor %}

If I disable caching in the page override settings then I can also prevent the error from being thrown. Do I need to blanket disable cache on all these pages or is there a better way?

@dredlong, You might consider logging this issue at the GitHub repo of the plugin.

Please ping back with any result.

Thanks, good call. Linking here in case it gets resolved there and this is useful to anyone else: