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

    A game changer for WooCommerce users
    • Our Highlights

    A game changer for WooCommerce users

    March 24, 2023 by createIT
    The differences between a web app and a mobile app
    • Services
    • Technology
    • Trends

    The differences between a web app and a mobile app

    March 7, 2023 by createIT
    Webrooming and showrooming
    • Trends

    Webrooming and showrooming

    February 14, 2023 by createIT
    PHPStorm – fix long load time of a directory window
    • Dev Tips and Tricks

    PHPStorm – fix long load time of a directory window

    January 20, 2023 by createIT
    reCAPTCHA v3 – WordPress implementation
    • Dev Tips and Tricks

    reCAPTCHA v3 – WordPress implementation

    January 20, 2023 by createIT
    How to compare GIT and server files
    • Dev Tips and Tricks

    How to compare GIT and server files

    January 19, 2023 by createIT
    How to trigger a click event inside iframe?
    • Dev Tips and Tricks

    How to trigger a click event inside iframe?

    January 19, 2023 by createIT
    FOOEvents – generate a custom CSV report
    • Dev Tips and Tricks

    FOOEvents – generate a custom CSV report

    January 19, 2023 by createIT
    Headless chrome – testing webgl using playwright
    • Dev Tips and Tricks

    Headless chrome – testing webgl using playwright

    January 18, 2023 by createIT
    Preview big SQL files with PilotEdit
    • Dev Tips and Tricks

    Preview big SQL files with PilotEdit

    January 18, 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