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 · 465 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 Water Science, 3 weeks ago
11 167 6 hours ago
Support · by Duc , 21 hours ago
1 44 21 hours ago
Support · by Thomas, 1 week ago
3 116 1 day ago
Support · by Anna, 4 days ago
2 109 2 days ago
Support · by Justin Young, 2 days ago
1 87 2 days ago