Website malfunction after the use of Pods plugin - createIT
Get a free advice now!

    Pick the topic
    Developer OutsourcingWeb developingApp developingDigital MarketingeCommerce systemseEntertainment systems

    Thank you for your message. It has been sent.
    Tags

    Website malfunction after the use of Pods plugin

    Website malfunction after the use of Pods plugin

    Pods is a content development framework for WordPress that you can use to create, manage and implement custom content – all in one place. It allows you both to create completely new material and to further customize the content that already exists. With an average rating of 4.9/5, it has become the favorite plugin for many creators.

    Despite the positive reviews of Pods, you may still encounter a problem with page listings. If you do, don’t worry – we have a solution for you.

    After routine WordPress plugin updates, we’ve noticed that some subpages are broken. HTTP response status code was still correct (200), but listing suddenly stopped rendering. A close look at source-view HTML showed:

    (...)
    <article id="post-393" class="post-393 page type-page status-publish hentry">
    <div class="entry-content">
    <div class="list-item-element">
    <div class="list-item-wrapper">
    <a class="list-thumbnail" href="/news/title-123/">
    <img src="/wp-content/uploads/2019/03/logo.jpg" />
    <h4 class="list-title">Title 123</h4>
    </a>
    </div>
    </div>
    (...) END of output

    We enabled WP-DEBUG Log to check if there are any PHP errors. We added the following solution to wp-conifg.php :

    // define('WP_DEBUG', false);
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', 'wp-content/ct_debugging.log');
    define( 'WP_DEBUG_DISPLAY', false );
    

    However, the error log didn’t show any critical errors. We had to conduct a more in-depth investigation: listings are rendered by wordpress plugin: Pods – Custom Content Types and Fields 2.7.21.
    In Wp-admin / Pods Admin / Pod Templates / news-root there was the following template:

    [before]
    <div class="main-list">
    [/before]
    <div class="list-item-element">
    <div class="list-item-wrapper">
    <a class="list-thumbnail" href="{@permalink}">
    <img src="{@post_thumbnail_url.full}" />
    <h4 class="list-title">{@post_title}</h4>
    </a>
    </div>
    </div>
    [after]
    </div>
    [/after]

    The bug was caused by {@post_thumbnail_url.full} in a situation when the “featured image” wasn’t added to the news. In the previous plugin version, it was working totally fine.

    Solution

    We introduced special tags into the template: [if post_thumbnail][/if]
    After adding those, the page started to work correctly again.

    [before] 
    <div class="main-list"> 
    [/before] 
    <div class="list-item-element"> 
    <div class="list-item-wrapper"> 
    <a class="list-thumbnail" href="{@permalink}">
     [if post_thumbnail] 
    <img src="{@post_thumbnail_url.full}" />
    [/if] 
    <h4 class="list-title">{@post_title}</h4>
    </a> 
    </div> 
    </div> 
    [after] 
    </div> 
    [/after]
    

    Update

    Some time later, the bug was fixed in the next plugin release (2.7.22). More info here: https://github.com/pods-framework/pods/pull/5805
    = 2.7.22 – August 13th 2020 =
    **Bug Fixes**
    * Fixed: Prevent fatal errors about memory when using certain magic tag / thumbnail combinations. #5805 (@JoryHogeveen)

    Comments
    0 response

    Add comment

    Your email address will not be published. Required fields are marked *

    Popular news

    Automating stock and price updates in WooCommerce
    • Dev Tips and Tricks

    Automating stock and price updates in WooCommerce

    September 23, 2024 by createIT
    Integrating advanced subscription features in WooCommerce
    • Dev Tips and Tricks

    Integrating advanced subscription features in WooCommerce

    September 16, 2024 by createIT
    Fetching Time records from ActiveCollab API
    • Dev Tips and Tricks

    Fetching Time records from ActiveCollab API

    September 9, 2024 by createIT
    Docker Compose for PrestaShop
    • Dev Tips and Tricks

    Docker Compose for PrestaShop

    September 2, 2024 by createIT
    WordPress wizard in admin – step by step
    • Dev Tips and Tricks

    WordPress wizard in admin – step by step

    August 29, 2024 by createIT
    Order Status Sync between PrestaShop and External APIs
    • Dev Tips and Tricks

    Order Status Sync between PrestaShop and External APIs

    August 26, 2024 by createIT
    What is PHP used for in web development 
    • Dev Tips and Tricks

    What is PHP used for in web development 

    August 22, 2024 by createIT
    Automating WooCommerce product availability date
    • Dev Tips and Tricks

    Automating WooCommerce product availability date

    August 15, 2024 by createIT
    WP Quiz Adventure – FAQ
    • Dev Tips and Tricks

    WP Quiz Adventure – FAQ

    August 12, 2024 by createIT

    Support – Tips and Tricks
    All tips in one place, and the database keeps growing. Stay up to date and optimize your work!

    Contact us