Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:05:39+00:00 2026-06-18T08:05:39+00:00

Tl;DR Twig won’t let me drill down into a nested object. I have this

  • 0

Tl;DR Twig won’t let me drill down into a nested object.

I have this collection of json_decoded objects that has a nested object within it. When trying to output a property of the nested object I get an error like:

Item “text” for “” does not exist

when I try a to dump out the nested object i can see it fine… but I can’t access any of it’s properties. Here’s the dump of the “entire” parent object

Using this in my loop
{% for item in allFields %}

    {{ dump(item) }}

{% endfor %}

Full Dump

And here is the dump of the nested label object its self using {{dump(item.label)}} in my loop

Using this in my loop
{% for item in allFields %}

    {{ dump(item.label) }}

{% endfor %}

Label Dump

I’m attempting to get the text property (and others) of the label class by using a twig for loop like so:

{% for item in allFields %}

    {{ item.label.text }}

{% endfor %}

And it is here that I get the error

Item “text” for “” does not exist

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:05:40+00:00Added an answer on June 18, 2026 at 8:05 am

    That is weird. One though: this happened to me on one occasion when my EntityManager was running out of memory due to very complex hydration query. I’m thinking that some part of data gets lots here and you get this error.

    So, how many item do you have in this allFields list?

    In order to troubleshoot this I suggest you do:

    {% for item in allFields %}
    
        {{ item.label is null or item.label == "" ? "***EMPTY-LABEL***" : item.label.text }}
    
    {% endfor %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my twig file i have a JS method that needs a path to
I have been looking at this twig code for a while, and tried a
I have a html.twig file with this {% set num= 1%} {% for idea
I have set up a bundle that has a test object which holds a
I'm in a Twig template, and I have a form variable that represents a
I have 1 controller that passes 2 paginated set of results to a twig
I have a base Twig template that has a search bar form in it
I have a twig variable html . To show it in a twig template
I'm trying to use translation in a custom twig filter like this public function
Twig lets you pass array or object to the template and gives you the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.