grav-plugin-tntsearch icon indicating copy to clipboard operation
grav-plugin-tntsearch copied to clipboard

Looking for xxxxx.json.twig templates

Open duartealexf opened this issue 5 years ago • 1 comments

I already investigated what happened and fixed it in my GravCMS instance.

When I tried to reindex from the admin page it only reindex 30 out of 600 pages. It turned out it was throwing an exception on the other pages. But that did not happen when running the reindex from the CLI. The exception message said that a 'xxxxx.json.twig' template did not exist.

Here's what happened...

When running the reindex from the admin page it sends a request to /admin.json/task:reindexTNTSearch.

This is the tntsearch.template used by all pages:

image

Which content is this:

image

When it tries to process this Twig file, take a look at this stack:

image

image

image

The problem is below... $extension ends up being "json"...

image

image

image

Anyways... I removed the .json extension from the tntsearch.js file and now it works.

image

duartealexf avatar Jun 11 '19 19:06 duartealexf

Grav v1.5.7 Admin v1.8.15 TNT Search v2.0.4

duartealexf avatar Jun 11 '19 19:06 duartealexf