Closed wbrowar closed 2 hours ago
You have an extra trailing ')
.
data-on-blur="{{ spark('_spark/main.twig', {}, 'post') }}')"
It should read:
data-on-blur="{{ spark('_spark/main.twig', {}, 'post') }}"
None of those appear to be typos in the docs, but let me know if I’ve overlooked something. I did a lot of work on the docs today and some clean up will likely follow.
Ah, good eye on the extra ')
. I took them all out and it's all working correctly again!
Regarding the docs, I'm still seeing some of the things I mentioned above, so maybe it's a rendering issue with the doc blocks?
Bug Report
Hey @bencroker, I updated Spark to
0.0.7
, updated my example code and tried to run it and got the following error in Chrome:Here is the demo code I'm using. This is in my
index.twig
file:And this is in my
main.twig
file:To isolate this I commented out the rest of the things I was testing Spark for so this should be the only thing interacting with Spark.
Also, unrelated to my issue above, I noticed a few typos in the docs:
'post'
is missing a trailing single quote:{{ spark('_spark/save-entry.twig', [], 'post) }}
method: 'post'
isn't in an object (I don't know if this is an issue but I think so):{{ spark('_spark/save-entry.twig', method: 'post) }}
{}
in Twig, instead of[]
:{{ spark('_spark/save-entry.twig', [], 'post) }}
Plugin Version
0.0.7
Craft CMS Version
5.4.8
PHP Version
8.2.22