Forum

Thread tagged as: Problem, Error, Field-Types

Image type losing images after first save

I'm having a problem with disappearing images I've not encountered before: I have a region containing a repeater with text fields and an image field. When I select an image and save, everything gets written to the database for that repeater item and the image displays on the web site but the image also disappears from the region edit form upon saving.

If I change something like add an image to one of the other repeater items—the image that was saved and displaying on the site gets removed from the web site. The new one I just added will also be written to the db and display on the site UNTIL THE NEXT SAVE.

Every time I re-save the region, images are lost unless I re-select each one from the asset library beforehand.

Is this a known problem, a new bug, or something I can remedy with a parameter?

Here is my template, if that might help:

<perch:repeater>
<perch:before></perch:before>
<div class="col-md-6 col-sm-6 iblock-multi">
    <img src="<perch:content id="photo" type="image" label="photo" bucket="people" />" class="responsive">
    <p class="text regular">
        <perch:content type="text" id="name" label="name" size="m" /><br>
        <span class="text-00">
            <perch:content type="text" id="title" label="title" size="m" />
        </span>
    </p>
    <a class="showhide noselect">bio</a>
    <div class="hid box-testimonial light-color text-00 text-left">
        <div class="quote-wrapper">
            <perch:content type="textarea" id="bio" label="bio" markdown="true" editor="markitup" size="l" />
        </div>
    </div>
    <br><br>
</div>
<perch:after></perch:after>
</perch:repeater>
Bloom Design

Bloom Design 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not a known problem, no. Is this your entire template - just a repeater?

It's the whole template, just a little region to display multiple members of the company, the first one using the image content type for a new site I'm hoping to "perchify" as I call it.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Your repeater does not have an ID or a label, these are required. Is this how it is in your site?

https://docs.grabaperch.com/docs/templates/repeaters/

Repeater parameters appear to have fixed it, thanks.

I was re-using markup I'd done for a site from a year ago. Now I'll make sure to check all the tags I'm using to see if they've changed.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

The required fields haven't changed, it may be that the error in your template hadn't caused an obvious problem before but this isn't something we have changed, the docs I linked to show these are required attributes.