Jump to content

Image field in repeater returns null in ProcessWire 3


Pavle
 Share

Recommended Posts

Hey all,

I have an image and text field in a repeater. When I iterate over repeater using foreach loop, image is not returned (null is returned instead), but text field is.

  • Some (I guess) useful information:
  • I am using ProcessWire 3.0.17
  • Image field supports svg format (jpg in not returned either)
  • Image filed is limited to one file and is without description
  • Image field's format is set as 'single or null', but array with field->first or field->eq(0) also doesn't work
  • Images are uploaded to server

I used the same approach foreach($page->repeater as $item) $item->image->url a dozen time before in older versions, so I wonder if something maybe changed in v3?

I ran out of ideas what could be wrong and what I need to change, so I hope you'll be able to help me :)

Thanks!

Žiga

PS. I also noticed that I cannot add description to .svg images. Is there a special reason for this?

Link to comment
Share on other sites

Hey!

I was using 3.0.17. I upgraded it to 3.0.18, but the problem still persists :(

Did you maybe use the 'Frontend editing' module? I installed and then removed it. But I am not sure if images were working before that, because I didn't have that part implemented yet...so basically I don't know if it has any relevance.

Link to comment
Share on other sites

No, I didn't use that module, but I've installed FrontEnd User which is not working anymore I don't know why. 

I will wait for next version as my site is in early development.

@chuguruk, you have one recent entry in the FrontEnd User thread:

How to add/remove css classes to rendered form?

I want to change how it's rendering, I can hide <li> through css, but how to add another class to form input field? 

 

I would kindly suggest that you make another entry in that thread and let the developer know more about how that module is not working anymore.

  • Like 1
Link to comment
Share on other sites

@chuguruk, you have one recent entry in the FrontEnd User thread:

I would kindly suggest that you make another entry in that thread and let the developer know more about how that module is not working anymore.

I would if I was sure that this modue is causing problem, but as I wrote - "I don't know why", and @Pavle is facing the same problem with different module.

I have installed this module on different instance of PW 3 and all seems to work fine (althrough it's an upgrade from 2.7).

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...