Jump to content
Sign in to follow this  
Pavle

Image field in repeater returns null in ProcessWire 3

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?

Share this post


Link to post
Share on other sites

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?

Same here!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Well, the workaround would still be to use 'normal' pages instead of repeater field, but it's not really that user-friendly for my case.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By brdje
      Greetings,
       
      I've ran into an issue with adding a repeater field to a template.
      The page editor in the backend shows the fields and the data attached to the fields, including the repeater.
       
       
      However, when viewing the template in the front-end, there is no sign of a repeater field in the data set.
      ["data"]=> array(3) { ["name1189"]=> string(11) "partenaires" ["status1189"]=> string(1) "1" ["title"]=> string(8) "Partners" } } Do u have any idea what could be causing this issue?
      I've tried recreating the field and there is no caching active, but still can't get the repeater in the data set.
    • By Mithlesh
      Changing it to null
    • By Mithlesh
      Hi, I have one URL - writerrelocations.com/contact-now/

      I have one issue where my header Image is appearing again after the contact form, for your reference:



      I have checked my processwire template section where have not added any Image field besides Header Image, attaching the same for the reference:




      PLEASE help me to get rid of the image below contact form

      Waiting for the swift response!

      Thanks
       
    • By tonicastillo
      Hi. Can I ask why this happens?
      When I upload a jpg, the meta keywords and description of the file loses the accents and spanish symbols of the words.
      Original image on the left, and the image generated by PW on resize on the right.

      This happens on resize. The uploaded file is ok.
      How can I control which meta keep in the photo?
      Thanks a lot (and sorry for my English)...
×
×
  • Create New...