Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Problems with table import, shortcode and caching

Started by Ed 6 years ago · 2 replies · 536 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 blu3prince, 4 days ago
1 85 19 hours ago
Support · by complanar, 1 week ago
6 168 2 days ago
Support · by Rick Beebe, 1 week ago
2 125 4 days ago
Support · by alex, 6 days ago
2 113 5 days ago
Support · by Marcel, 2 weeks ago
1 159 5 days ago