Shortcode when adding image to event doesn't render

  • Hi,


    I'm trying to add an image to an event and the shortcode doesn't render. I've attached 3 screenshots with a debug report plus how it looks in the admin and events page. Fyi, we've just updated to Perch 3 and everything seems to be working except for this. Let me know if you have any other questions...thanks!


    Dilan

  • drewm

    Approved the thread.
  • I think the issue is that the Events app is so old that it doesn't use the standard Perch field type infrastructure.


    Is this a new implementation of the Events app, or are you updating an old site that already uses it?

  • Thanks for getting back to me again. This is an update of an old site. Per your suggestion, I look to see if it's using the updated events app, and it is, but there's custom code in there as well. Here's the old code for rendering those images from a page called month-view.html:

    Code
    1. <img src="<perch:content id="image" type="image" label="Image" output="path" />" alt="<perch:events id="eventTitle" />" class="event-image" />
    2. <perch:events id="eventDescHTML" encode="false" / >

    I swapped that out with code taken from the new events app from the event-detail.html page:

    Code
    1. <perch:if exists="image">
    2. <img src="<perch:events id="image" type="image" label="Image" width="640" crop="true" />" alt="<perch:events id="eventTitle" />" />
    3. </perch:if>

    But that still didn't render the images correctly. Any ideas? Thanks again!

  • That didn't have any effect. When I add the conditional "if exists" like below the images disappears all together:

    Code
    1. <perch:if exists="image">
    2. <img src="<perch:events id="image" type="image" label="Image" width="640" crop="true" />" alt="<perch:events id="eventTitle" />" />
    3. </perch:if>

    Here's the shortcode again just for reference:


    Code
    1. [cms:asset 610 title=”Asset 12 21 18 SiVIC Homeless Memorial (Zen Center) (1a)”]