Support » Plugin: Pods - Custom Content Types and Fields » [each] stopped returning data after WordPress 5.5.3 update

  • Resolved sueboothby

    (@sueboothby)


    I have a Pod with a Photos field which typically has 40-50 photos uploaded. I display the photos using [each photos] to iterate through the photos. With the latest WordPress update, the template is returning the first photo. For the rest of the photos, the code is generated without a path to the photos. Therefore, on the page, only one photo shows.

    Pods version 2.7.23
    Wordpress version 5.5.3

    Template:

      [each photos]
    	<div class="cbp-item">
    		<a href="{@_src.large}" class="cbp-caption cbp-lightbox">
    			<div class="cbp-caption-defaultWrap">
    				<img src="{@_src.medium}" data-cbp-src="{@_src.medium}" width="640" height="400">
    			</div>
    			<div class="cbp-caption-activeWrap">
    				<div class="cbp-l-caption-alignCenter">
    					<div class="cbp-l-caption-body">
    						<div><i class="fa fa-plus-circle fa-4x"></i></div>
    					</div>
    				</div>
    			</div>
    		</a>
    	</div>
      [/each]

    Page: (photos show under the 3 teal CTA buttons)
    https://peterglaughlin.com/sarasota-luxury-homes/1924-deer-park-circle-sarasota-fl/

    Page Code: (starting at line 333)
    view-source:https://peterglaughlin.com/sarasota-luxury-homes/1924-deer-park-circle-sarasota-fl/

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Can you try downgrading to Pods 2.7.22 to see if that resolves your issue?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @sueboothby

    I just tried to reproduce this locally but on my installation the code you’ve shared works well.
    Could you provide us with more info about your configuration?

    Cheers, Jory

    Scott: I can’t go back to 2.7.22 because I installed 2.7.23 to resolve another issue.

    Jory:
    WordPress 5.5.3 running Divi Child theme
    PHP 7.1.33

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @sueboothby

    Can how share with us how you’ve created this part of the page exactly?
    How do you include the template for example?

    I also assume you already checked for other plugin conflicts?

    Cheers, Jory

    Yes. I have checked for plugin conflicts. The code was working before the update to latest WordPress. All the photos are showing in the page that collects the data. However, the paths to photos #2+ are not showing on the display page.

    Here is the full code for the display page. The code for the photos is in <!– SECTION 1 –> <div id=”cbp-photo-slider” class=”cbp cbp-l-grid-mosaic”>

    <!-- SECTION 0 -->
    <div class="et_pb_section property-header listings-single et_pb_section_0">
    
    <div class="et_pb_row et_pb_row_0 et_pb_gutters2">
    <div class="et_pb_column et_pb_column_1_2 et_pb_column_1    et_pb_css_mix_blend_mode_passthrough">
      <div class="et_pb_module et_pb_text et_pb_text_0 et_pb_bg_layout_light  et_pb_text_align_left">
        <div class="et_pb_text_inner">
          <h1 class="property-title">[if active]<a class="back-arrow" href="/sarasota-luxury-homes/"><i class="fa fa-angle-left"></i></a>[/if][if sold]<a class="back-arrow" href="/sold-luxury-homes/"><i class="fa fa-angle-left"></i></a>[/if]{@address} | {@list_price}</h1>
        </div>
      </div> <!-- .et_pb_text -->
     </div>
     <!-- .et_pb_column -->
     
     <div class="et_pb_column et_pb_column_1_4 et_pb_column_2    et_pb_css_mix_blend_mode_passthrough">
      <div class="et_pb_button_module_wrapper et_pb_button_0_wrapper et_pb_button_alignment_ et_pb_module property-cta-buttons">
        <a style="width:100%;" class="et_pb_promo_button et_pb_button" href="tel:19413568428">Call 941.356.8428</a>
      </div>
    </div>
    <!-- .et_pb_column -->
    
    [if active]
    <div class="et_pb_column et_pb_column_1_4 et_pb_column_3    et_pb_css_mix_blend_mode_passthrough">
      <div class="et_pb_button_module_wrapper et_pb_button_1_wrapper et_pb_button_alignment_ et_pb_module property-cta-buttons">
        <a style="width:100%;" class="et_pb_promo_button et_pb_button" href="/request-showing?Address={@address}">Request Showing</a>
      </div>
    </div>
    [/if]
    <!-- .et_pb_column -->
    </div>
    <!-- .et_pb_row -->
    
    </div>
    <!-- SECTION 0 -->
    
    <!-- SECTION 1 -->
    <div class="et_pb_section et_pb_fullwidth_section et_pb_section_1 et_section_regular" style="clear:both;">
    
      [if video_link]
          <div class="video-container listing-video">
            <iframe width="1920" height="1080" src="{@video_link}" frameborder="0"></iframe>
          </div> 
      
        <!-- .et_pb_row -->
        <div id="cta-buttons" class="et_pb_row et_pb_row_0 et_pb_gutters2 property-cta-buttons2">
    
        <!-- .et_pb_column -->
        <div class="et_pb_column et_pb_column_1_3 et_pb_column_0    et_pb_css_mix_blend_mode_passthrough">
          <div class="et_pb_button_module_wrapper et_pb_button_0_wrapper et_pb_button_alignment_center et_pb_module ">
            <a class="et_pb_button et_pb_button_0 et_pb_bg_layout_light" style="width:100%;" href="tel:19413568428">941.356.8428</a>
          </div>
        </div>
        <!-- .et_pb_column -->
    
        <!-- .et_pb_column -->
        <div class="et_pb_column et_pb_column_1_3 et_pb_column_1    et_pb_css_mix_blend_mode_passthrough">
          <div class="et_pb_button_module_wrapper et_pb_button_1_wrapper et_pb_button_alignment_center et_pb_module ">
            <a class="et_pb_button et_pb_button_1 et_pb_bg_layout_light" style="width:100%;" href="#request-info-form">Request Information</a>
          </div>
        </div>
        <!-- .et_pb_column -->
    
        <!-- .et_pb_column -->
        <div class="et_pb_column et_pb_column_1_3 et_pb_column_2    et_pb_css_mix_blend_mode_passthrough">
          <div class="et_pb_button_module_wrapper et_pb_button_2_wrapper et_pb_button_alignment_center et_pb_module ">
              <a href="{@post_thumbnail_url.large}" class="et_pb_button et_pb_button_2 et_pb_bg_layout_light cbp-lightbox" style="width:100%;">Photo Gallery</a>
          </div>
        </div>
        <!-- .et_pb_column -->
    				
        </div>
        <!-- .et_pb_row -->
      [/if]
    
      <div id="cbp-photo-slider" class="cbp cbp-l-grid-mosaic">
    
      [if videourl]
    	<div class="cbp-item cbp-video">
    		<a href="{@videourl}&rel=0" class="cbp-caption cbp-lightbox">
    			<div class="cbp-caption-defaultWrap">
    				<img src="{@post_thumbnail_url.medium}" alt="">
    			</div>
    		</a>
    	</div>
      [/if]
    
      [each photos]
    	<div class="cbp-item">
    		<a href="{@_src.large}" class="cbp-caption cbp-lightbox">
    			<div class="cbp-caption-defaultWrap">
    				<img src="{@_src.medium}" data-cbp-src="{@_src.medium}" width="640" height="400">
    			</div>
    			<div class="cbp-caption-activeWrap">
    				<div class="cbp-l-caption-alignCenter">
    					<div class="cbp-l-caption-body">
    						<div><i class="fa fa-plus-circle fa-4x"></i></div>
    					</div>
    				</div>
    			</div>
    		</a>
    	</div>
      [/each]
      </div>
    
      [if matterport_link]
          <div class="video-container" id="matterport">
            <iframe width="1920" height="1080" src="{@matterport_link}&wh=0" frameborder="0" allowfullscreen allow="vr"></iframe>
          </div> 
      [/if]
    
    </div>
    <!-- SECTION 1 -->
    
    <!-- SECTION 2 -->
    <div class="et_pb_section  et_pb_section_2 et_section_regular listing-info">
    
    <!-- SECTION 2 ROW 1 -->
    <div id="listing-info" class=" et_pb_row et_pb_row_1">
    
    <!-- SECTION 2 ROW 1 COL 1 -->
    <div class="et_pb_column et_pb_column_2_3  et_pb_column_2">
    	
    <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left  et_pb_text_2">
    	<h2>{@post_title}[if awc]<span class="listing-status"> - Active with Contract</span>[/if][if pending]<span class="listing-status"> - Pending</span>[/if][if sold]<span class="listing-status"> - Sold</span>[/if]</h2>
    	[if lot_size]<h3>Land: {@lot_size}</h3>[/if]
    	[if beds]<h3>{@beds} Beds | {@baths} Baths | {@square_feet} sq. ft.</h3>[/if]
    	<h4>Luxury Home [if active]for Sale[/if][if sold]Sold[/if] in Sarasota, FL | {@mls_number}</h4>
    	[if sold]
    		<div class="sale-price">Selling Price: {@sale_price}<br/>
    			Sold
    			[if days_on_market] in {@days_on_market} days[/if]
    			[if list_to_sale_price] at {@list_to_sale_price}%[/if]
    		</div>
    	[/if]
    	{@post_content}<br/>
    	<strong>{@address}<br/>
    	Sarasota, Florida</strong>
    </div>
    
    <div id="request-info-form" class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
    	<h2>Request Information for <em>{@post_title}</em></h2>
    	<?php echo do_shortcode('[gravityform id="3" title="false" description="false" ajax="true" field_values="address=' . get_the_title() . '"]'); ?>
    </div>
    
    </div>
    <!-- SECTION 2 ROW 1 COL 1 -->
    
    <!-- SECTION 2 ROW 1 COL 2 -->
    <div class="et_pb_column et_pb_column_1_3  et_pb_column_3">
      <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_text_4">
    	[if floorplan]<a class="et_pb_promo_button et_pb_button property-action-button" href="{@floorplan}" target="_blank" rel="noopener noreferrer">Download Floorplan</a>[/if]
    	[if features_sheet]<a class="et_pb_promo_button et_pb_button property-action-button" href="{@features_sheet}" target="_blank" rel="noopener noreferrer">Download Feature Sheet</a>[/if]
    	[if survey]<a class="et_pb_promo_button et_pb_button property-action-button" href="{@survey}" target="_blank" rel="noopener noreferrer">Download Survey</a>[/if]
      </div>
      [if features]
      <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_text_3 property-features">
    	<h2>Property Features:<br/>
    	<em>{@post_title}</em></h2>
    	{@features}
      </div>
      [/if]
    </div>
    <!-- SECTION 2 ROW 1 COL 2 -->
    
    </div>
    <!-- SECTION 2 ROW 1 -->
    
    <!-- SECTION 2 ROW 2 -->
    <div id="locator-map" class=" et_pb_row et_pb_row_2">
    <div class="et_pb_column et_pb_column_4_4  et_pb_column_4">
    	<h2>Map & Directions for <em>{@post_title}</em></h2>
    	<div class="listing-map">
    		{@map}
    	</div>
    </div>
    </div>
    <!-- SECTION 2 ROW 2 -->
    
    </div>
    <!-- SECTION 2 -->
    
    <!-- INIT CUBEPORTFOLIO PHOTO SLIDER -->
    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/cubeportfolio/js/cpb-photo-slider.js"></script>

    I created a very simple test template:

    [each photos]
    <img src="{@_src.medium}" data-cbp-src="{@_src.medium}" width="640" height="400">		
    [/each]

    And added this shortcode to a page:
    [pods name="sarasota_luxury_home" slug="photos_test" template="photos_test"]

    Same result. Photo 1 shows. Photo’s 2+ don’s show. See page at:
    https://peterglaughlin.com/pods-photos-test/

    I did 2 more tests.

    Added field using shortcode:

    [pods name="sarasota_luxury_home" id="57603" field="photos"]

    This shortcode returned all the image paths.

    Then, created a really simple test template:

    [each photos]
    {@_img.medium}	
    [/each]

    Only photo 1 shows.

    Same test page at:
    https://peterglaughlin.com/pods-photos-test/

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @sueboothby

    I’ve found the issue and created a patch:
    https://github.com/pods-framework/pods/pull/5883

    I had a media Pod active in my local installation and thus this issue never happened.

    Could you test as well?

    Cheers, Jory

    sueboothby

    (@sueboothby)

    Hi Jory — Thanks for working on this. I want to test it, but I don’t know how to install the patch. Do I replace the one file, or re-install Pods?

    sueboothby

    (@sueboothby)

    I installed the patch. [each] is now working as it should. Thank you!!!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @sueboothby

    Good to hear and you’re welcome! The best way to say thanks is to leave a 5 star review at https://wordpress.org/plugins/pods/ and (if you’re feeling especially generous) become a Friend of Pods at https://friends.pods.io/

    Cheers, Jory

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.