troubleshooting Question

What does this error mean and how can I fix it?

Avatar of Bruce Gust
Bruce GustFlag for United States of America asked on
JavaScriptNode.js
3 Comments1 Solution50 ViewsLast Modified:
Here's the portion of my twig file that has me baffled...

 <div class="collapse" id="act-{{activity._id}}">
                {% for key, val in activity.meta %}
				<div class="box-item">
				<strong>{{key}}</strong>:<span>{{val}}</span>
				</div>
                {% endfor %} 

I know that doesn't look like much, but I'm still new to this so it doesn't take much to get me to a place where I'm scratching my head.

In any event...

That "for" loop is what's feeding the "date" and the "notes" that you see below.

screenshot
What I need to do is reformat that date. So, my plan is to grab the date as it's coming in, reformat it and then print it. So, the first step is to grab the date and I tried this (code in bold):

 {% for key, val in activity.meta %}
				<div class="box-item">
					[b]{% if key=="date" }}
					good times
					{{ %endif %}}[/b]
					<strong>{{key}}</strong>:<span>{{val}}</span>
				</div>
                {% endfor %} 

When I did that, I got this error:

Error compiling twig template C:\wamp64\www\bSmart\views\partials\company-slide-out\history-tab.html.twig:
TwigException: Twig.expression.type.variable cannot follow a Twig.expression.type.object.end at template:13 near 'good...'

What does that mean and how can I fix it?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros