• JCV

    (@psykonevro)


    Featured images are not displayed anymore in posts.

    I used them as a background for the title in my posts. They’re not shown anymore and a Apache warning is thrown:
    Warning: Trying to access array offset on value of type bool in wp-content/themes/oceanwp/inc/helpers.php on line 2494

    It is definitely related to my previous report

    Most certainely also linked somehow to this recent report

    Definitely a bug brought by the latest release.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello @psykonevro,

    Thank you for reaching out,

    Please share a live URL from the issue.

    I fully examined the issue you have raised on this topic and could not see it on my end.
    How can we replicate your steps to arrive at the issue on a fresh WordPress installation?

    Also, kindly provide us with your system environment information. To do this, please go to WP Dashboard > Tools > Site Health > Info Tab and click on the button Copy site info to clipboard. You can send the information as code here or upload it to https://pastebin.com/ and get an exclusive link: https://i.postimg.cc/fbjtkFyJ/image.png(you can remove your email address from the content).

    Before sending these, please make sure that:
    Everything on your website is running the latest versions (WP, theme, plugins).
    If possible, perform a basic troubleshooting checkup method and make sure the issue is related to our theme or plugin(s). To do this, activate the parent theme, then deactivate all other plugins, after that, activate them one by one and check for this issue. Continue doing this until you find out what product is causing a conflict with our product(If there is a plugin related to this topic, please let us know the name of that plugin.). Then provide the details as explained above.

    Note 1: If you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes.

    Note 2: If it happens on the child theme; kindly do these steps.

    Note 3: Generally, warnings do not harm your website. However, we will investigate this topic and find out why the featured images are not displayed on posts.

    Please keep us posted.
    Thank you,
    Best Regards

    Thread Starter JCV

    (@psykonevro)

    Thanks for your reply.

    1/ My envir: https://pastebin.com/C9GUF18D
    Bascially, php 8.2 and Apache 2.4
    I use a cache plugin, but as I’m logged in as admin no cache is used.

    2/ I tried to debug, but couldn’t see any issue except OceanWP’s one. I deactivated all plugins, and the featured image was still not displayed.

    3/ I use a child theme. If I switch to Ocean parent theme, the warning is gone, which is normal, since the featured image is not displayed in the same area.

    4/ An example post:
    https://www.jcvignoli.com/blog/2020/maria-reiche-la-folle-du-desert-qui-amena-labondance-a-nazca

    5/ The featured image (which is not displayed where the title “Maria Reiche, la folle du désert qui amena l’abondance à Nazca” is) is
    https://www.jcvignoli.com/blog/wp-content/uploads/Nasca-geoglyphe-singe.jpg

    6/ HOWEVER… on some pages there is no such warning and the featured image is properly displayed, like here:
    https://www.jcvignoli.com/blog/2024/la-gambie-un-moteur-de-justice-inter-nationale
    https://www.jcvignoli.com/blog/2023/lovniport-de-werner-jaisli-a-cachi-un-leg-pas-comme-les-autres
    https://www.jcvignoli.com/blog/2023/sortie-du-livre-pour-un-poignee-divoire

    This bug seems to be related to the size of the picture, due to the location’s warning.

    Hello @psykonevro,

    Thank you for reaching out,

    Regarding the issue related to the featured image not being displayed in only one post, it is unlikely that the theme caused the issue. If that issue was related to the theme, the featured image would not be displayed anywhere on the website, not just in one single post. On the other hand, while I saw the warning, I could not see the issue with a featured image.

    Please test the following three solutions and let me know the results:

    1. Check the OceanWP Settings: Review the OceanWP Settings and see if you have configured any specific settings for the Page Title. For instance, you might have unset the background or left the option open without setting an image.
    Screenshot: https://postimg.cc/Dm7wZxr5

    2. Recreate the post: Try to re-create the post without making any changes to the settings and check if the featured image shows.

    3. Change the image: Try to upload a different image on (solution #2) and recheck the issue.

    I hope it helps.
    Please keep us posted.
    Best Regards

    Thread Starter JCV

    (@psykonevro)

    Hi @skalanter,

    Please note that I haven’t changed any settings recently on my website, and I went through much debugging to exclude the most obvious issues that could come from side. I deactived all plugins, no change.

    On the other hand, while I saw the warning, I could not see the issue with a featured image.

    I don’t get you: I shared two series webpages, one with the featured image shown as a title background, and another one without image background but only a black background. You can’t see the issue?

    Furthermore, as I guessed initially, it may be related to the pictures used as featured image.
    If I use this picture as featured image, everything is fine:
    https://www.jcvignoli.com/blog/wp-content/uploads/la-gambie-un-moteur-de-justice.jpg
    If I use this one, the featured image doesn’t show up and warnings are thrown:
    https://www.jcvignoli.com/blog/wp-content/uploads/Nasca-geoglyphe-singe.jpg

    Could you run some tests and see how OceanWP runs with these featured images?

    Thread Starter JCV

    (@psykonevro)

    For the records: the absence of an image may be older than the last release, I can’t check. But the warnings are definitely new.

    Hello @psykonevro,

    Thank you for reaching out,
    Regarding the warning, please follow this topic:
    https://www.ads-software.com/support/topic/rying-to-access-array-offset-on-value-of-type-bool-since-latest-release/

    Regarding this topic, I’ve tried to replicate it on my end(screenshot: https://postimg.cc/YvYnY5By), but I saw no issue. I saw the issue only on your website but couldn’t understand how we can reproduce the issue on our end(we need to reproduce the issue somewhere other than your website to understand it).
    Did you test the three items I mentioned earlier?
    What was the outcome?
    Also, we have not received any similar reports so far.

    Please tell us how we can replicate your steps to arrive at the issue on a fresh WordPress installation. Can you please share a short video about it?

    Thank you,
    Best Regards

    Thread Starter JCV

    (@psykonevro)

    Hi @skalanter

    Not sure why you mention the topic I opened myself?

    It’s quite complicate for me to go set up the same installation; I have a highly customized WordPress/OceanWP install, I did the first steps, but I got discouraged when I saw so many options to go through again…

    I’m just positively certain I hadn’t these warning before the update. If I have more time to debug, I’ll let you know.

    I have exactly the same problem, I solved it by modifying code line 2481 of the helper.php file
    initially: $bg_img = get_the_post_thumbnail_url();
    By: $bg_img = get_the_post_thumbnail_url( get_the_ID() , $bg_img_size );

    Thread Starter JCV

    (@psykonevro)

    @rock4temps You’re a genius! I was able to take the warning away by fixing line 2494
    $bg_img = $bg_img[0];
    with
    $bg_img = is_string( $bg_img) ? $bg_img[0] : '';
    (the right $bg_img was bool in my case, thus the warning) but I wasn’t able to get back the picture.

    Thanks a million!

    Hope this bug fix will make it to the next OceanWP version.

    • This reply was modified 8 months, 1 week ago by JCV.
    Shahin

    (@skalanter)

    Hello All,

    Thank you for reaching out,

    Regarding the warning, would you please follow this topic:
    https://www.ads-software.com/support/topic/rying-to-access-array-offset-on-value-of-type-bool-since-latest-release/ here is related to that warning.
    The one mentioned here is duplicated.

    As I mentioned earlier, the featured images don’t show (this topic) on your website. We couldn’t replicate that issue on our website, and we have not received any similar reports so far.

    @psykonevro please tell us how we can replicate your steps to arrive at the issue somewhere other than your website.

    As we are not sure how to reproduce the issue you mentioned on this topic, it is possible that there might be a glitch in your website’s database.
    In order to resolve it, I recommend installing WP-Optimize plugin and cleaning up the database. Before using the plugin, make sure to take a full backup.
    This should help resolve the issue related to not showing one featured image in your post.

    If the issue persists, please create a new post and upload a different version of that image to check if the featured image appears.

    I hope that helps.
    Best Regards

    Thread Starter JCV

    (@psykonevro)

    Hi @skalanter
    I don’t see how optimizing tables would help in that matter, but I used your recommended plugin to do it. Didn’t changed anything.
    Before going forward with the debuging, could you explain why @rock4temps fix works perfectly on my end and his end?
    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Featured images not displayed anymore’ is closed to new replies.