Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Problems with table import, shortcode and caching

Started by Ed 6 years ago · 2 replies · 520 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 Paul Hodges, 4 weeks ago
19 491 6 days ago
Support · by Lauw, 1 week ago
2 107 1 week ago
Support · by Anna, 3 weeks ago
4 431 1 week ago
Support · by gtx, 4 weeks ago
4 380 3 weeks ago
Support · by Anna, 1 month ago
9 487 4 weeks ago