Bolt: [BUG] Repeater data is not retrieved on frontend

Created on 8 Mar 2017  路  5Comments  路  Source: bolt/bolt

  • Bolt Version: 3.2.7
  • Install type: Composer install
  • PHP version: 7.0 (fpm)
  • Used web server: Nginx

Hi,

I have some trouble with repeaters.
In fact, I added a field on page content type (pages_fr, because I have a multilingual website), here is my configuration :
screen shot 2017-03-08 at 16 56 11

In the back office, everything is ok, the repeater appears and the data is well persisted:
screen shot 2017-03-08 at 16 58 42

However, in frontend, when I try to access to the data, it is empty :(
screen shot 2017-03-08 at 16 59 12

Do you have any idea about this issue ?

Thank you for your help !

question

Most helpful comment

Can you try to explicitly set the slug?

pages_fr: 
  slug: pages_fr
  singular_slug: page_fr

Might be the same issue as #6438

All 5 comments

This seems correct. You'll need to iterate over slider to get the items one by one. See the docs about this subject: https://docs.bolt.cm/3.2/fields/repeater#example-usage-in-templates

(I'm closing this as it is a question, feel free to re-open if you're certain it is a bug instead)

Hi @bobdenotter,

Thank you for the link of the documentation x)

I followed this part but it doesn't work :
screen shot 2017-03-08 at 17 08 30

The result is :
screen shot 2017-03-08 at 17 09 58

{{ dump(slide) }} => RepeatingFieldCollection with empty elements
{{ slide.get('slide_title') }} => blank / nothing / empty :(

Can you try to explicitly set the slug?

pages_fr: 
  slug: pages_fr
  singular_slug: page_fr

Might be the same issue as #6438

You save my day ! Thank you very much 馃憤

You're welcome! :-)

Was this page helpful?
0 / 5 - 0 ratings