• Resolved MarthaBechtel

    (@marthabechtel)


    I am having the oddest issue and I’m stumped on how to fix it.

    This worked perfectly previously (aka ‘yesterday and all the days before’) and it’s a theme I’m fiddling with so I know there haven’t been any changes to the theme. On that same note, I might not have updated something if JetPack changed recently that needs updating.

    For some pages the block is being created properly (example below) and for others it’s missing the additional style tag. From random sampling, it looks like almost all of the posts are formatting incorrectly.

    For the posts where the block is not loaded correctly, the formatting ignores all of the jp settings and defaults to the page style.

    Good example:
    <div id="jp-relatedposts" class="jp-relatedposts" style="display: block;">
    https://www.martha.net/2020/05/of-writing-desks-and-droughts/

    Bad example:
    <div id="jp-relatedposts" class="jp-relatedposts">
    https://www.martha.net/2020/05/saturday-story-prompts-2020-05-16/

    I can’t figure out why one post would get the right format and the other wouldn’t!

    Here’s what’s showing for the Styles for the one that works:

    element.style {
        display: block;
    }
    
    #jp-relatedposts {
        display: none;
        padding-top: 1em;
        margin: 1em 0;
        position: relative;
        clear: both;
    }
    *, :after, :before {
        box-sizing: inherit;
    }
    *, :after, :before {
        box-sizing: inherit;
    }
    user agent stylesheet
    div {
        display: block;
    }

    Here’s what’s showing for the Styles for the one that’s broken:

    element.style {
    }
    
    *, :after, :before {
        box-sizing: inherit;
    }
    *, :after, :before {
        box-sizing: inherit;
    }
    user agent stylesheet
    div {
        display: block;
    }

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Fotis Stathopoulos

    (@fstat)

    Hi there,

    What exactly do you mean by good and bad format? The Related posts block is exactly the same on both posts. What I mean by the same, is that it has the same alignment and same styling.

    Thread Starter MarthaBechtel

    (@marthabechtel)

    Thank you for taking a look! 🙂

    This appears to be a Chrome specific issue. I didn’t notice because it’s my primary browser, but when I tested on Edge and IE11 it has no issues.

    I have cleared my browser caches (and the caches for the website)

    Here’s a screenshot comparing the two so you can see what I’m seeing:

    https://www.martha.net/wp-content/uploads/2020/05/Comparison-screenshot-of-Jetpack-Related-Post-formatting-issues.png

    I’m using Version 83.0.4103.61 (Official Build) (64-bit)

    Plugin Contributor James Huff

    (@macmanx)

    Is there any improvement if you switch off all Chrome extensions?

    If so, reactivate each one individually until you find the problem.

    Thread Starter MarthaBechtel

    (@marthabechtel)

    Thanks for the response,

    I disabled all Chrome extensions, cleared all caches… and now all of the pages have the issue with missing formatting. Reversing the process and turning them back on didn’t change anything.

    So I’ve gone from most pages broken (for me) to all pages broken.

    Why would the plugin stop generating the html correctly? I really liked your related posts feature and I’d prefer to keep using it if possible.

    Would a workaround be for me to try and manually insert the code into the page and post templates?

    Thread Starter MarthaBechtel

    (@marthabechtel)

    SOLVED

    After some additional experimentation on my own, I discovered that this was caused by a Minify feature that I was using to reduce load times. It compacts the CSS/JS/HTML and was apparently removing some of the things JetPack required.

    • I turned off the Minify settings and the pages returned to normal.

    I have no idea why these settings only caused issues on Chrome and only issues on some pages, but it looks fixed for now.

    Plugin Support Fotis Stathopoulos

    (@fstat)

    Thank you for sharing the solution. Let us know if you need help with anything else.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Related Posts sometimes missing css styling’ is closed to new replies.