corcel / acf

Advanced Custom Fields (ACF) plugin for Corcel
126 stars 98 forks source link

Corcel Repeater query issue #70

Closed AshleyLutchumun closed 6 years ago

AshleyLutchumun commented 6 years ago

Hi,

I am getting following error while querying for repeater

image

My query is $product->acf->repeater('pillars')

darrenkhouston commented 6 years ago

@ReaperOrckid, I was having this same issue. I noticed that I was using SVG's for the image slot in my repeater, and there is an error when trying to retrieve it. I switched it to PNG, and that worked.

If yours is not related to the images, it could be that you need to call the repeater directly by using something like:

$pillars = (array) $product->acf->pillars; then you can run a @foreach for each item. I am using this in my blade file not in the controller.

AshleyLutchumun commented 6 years ago

Hello Darren,

Thank you for your response. I have resolved the issue by changing the type from image to file.