Full-width parallax featured post image not displaying for PHP 7.2

Hi there!

A couple of years ago I implemented the full-width parallax featured post image trick as described here:


It has worked great for PHP v7.1 till now that I am upgrading to PHP v7.2. With v7.2, the featured image does not display for any of the posts in my blog.

Has anyone here experienced the same effect? if yes, could you identify the reason?

Thanks a lot in advance!

David

Hello David,

Thanks for writing in! Please be informed that upgrading your PHP version will not affect your site styling. Unless of course there are errors in the code that generates the dynamic styling of your site. It could also be caused by a plugin conflict, amongst other things. Please check out this troubleshooting article here and follow the instructions for the following sections (where appropriate):

  • Testing for Plugin Conflict
  • Theme Update
  • Child Theme
  • Disabling Cache
  • Disabling CDN

To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi Rue,

Thank you very much for your prompt reaction. I already went through the troubleshooting process to no avail so far. It is an ongoing process, but I would appreciate if you guys could give it a look with fresh pairs of eyes, of course as long as your policy permits.

In the following I will add a secure note with everything you need to access my site

Thanks a lot in advance and kind regards,

David

Hello David,

Thanks for writing in!

I have checked the site and compared the result when using PHP 7.1 and 7.2. It appears that Ben Ryan’s code is not future proof. His code is not working perfectly as you upgrade the PHP version to 7.2. You may need to update the Child theme that you have downloaded from his site. He also announced that he has modified the code last April 2020.

UPDATED – 17 Apr 2020

Over the past few weeks I have been working on improvements to the full width parallax featured image as requested by users within the X Theme Users Community facebook page. The latest improvements include:

  • Support for both ThemeCo’s X Theme and the NEW Pro Theme
  • More streamlined coding
  • Better support of mobile devices

Hope you enjoy and keep the requests and feed back coming.

You may need to contact him as these changes were already done as a 3rd party coding. We cannot check which line of code is causing it because we cannot access the theme files in your child theme. If you can give us FTP details, we may be able to help analyze what is wrong with the code in your child theme.

Best Regards.

Hi Rue,

Thank you so much for looking into it. I will contact Ben, but I would also appreciate a second opinion if you guys would be ready too. In the following, credentials for the FTP, so that you can have a look at the PHP code

Thank you so much, I really appreciate your help

Hi David,

I tried, but it seems whatever edit done on your child theme is not being replicated. See the child theme’s style.css file, I leave a /*test*/ comment there for test, but if you look directly on that file at the frontend, there is nothing (see link below).

Is there a chance that we/you are looking at the wrong child theme?

There’s the error from your error log:

[29-Jun-2020 15:53:50 UTC] PHP Warning:  Use of undefined constant full - assumed 'full' (this will throw an Error in a future version of PHP) in /home/c2camera/staging/1/wp-content/themes/x-child/framework/views/renew/wp-single.php on line 24
[29-Jun-2020 15:56:56 UTC] PHP Warning:  Use of undefined constant full - assumed 'full' (this will throw an Error in a future version of PHP) in /home/c2camera/staging/1/wp-content/themes/x-child/framework/views/renew/wp-single.php on line 24

When I look at the original code the line is: <?php the_post_thumbnail_url(null); ?>

But on your site is written as: <?php the_post_thumbnail_url('full'); ?>

But I can’t tell if that is really the issue since I can’t test it.

Since this is a 3rd party customization, please understand that we won’t we able to provide further support from here.

Thanks,