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

    eCommerce growth – is your business ready?
    • Services
    • Trends

    eCommerce growth – is your business ready?

    April 8, 2024 by createIT
    Digital marketing without third-party cookies – new rules
    • Technology
    • Trends

    Digital marketing without third-party cookies – new rules

    February 21, 2024 by createIT
    eCommerce healthcheck
    • Services
    • Trends

    eCommerce healthcheck

    January 24, 2024 by createIT
    Live Visitor Count in WooCommerce with SSE
    • Dev Tips and Tricks

    Live Visitor Count in WooCommerce with SSE

    December 12, 2023 by createIT
    Calculate shipping costs programmatically in WooCommerce
    • Dev Tips and Tricks

    Calculate shipping costs programmatically in WooCommerce

    December 11, 2023 by createIT
    Designing a cookie consent modal certified by TCF IAB
    • Dev Tips and Tricks

    Designing a cookie consent modal certified by TCF IAB

    December 7, 2023 by createIT
    Understanding the IAB’s Global Vendor List (GVL)
    • Dev Tips and Tricks

    Understanding the IAB’s Global Vendor List (GVL)

    December 6, 2023 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