Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Problems with table import, shortcode and caching

Started by Ed 6 years ago · 2 replies · 619 views
6 years ago

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:

TWIG
{% 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?

6 years ago

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

Please ping back with any result.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 231 12 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 6 days ago
1 98 2 days ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 108 6 days ago