-
AuthorPosts
-
September 20, 2022 at 12:53 pm #1365694
Hi I have a site that has been customised to use advanced custom fields to create an online database of the stories of people on local war memorials. I have to update the site from PHP 7.4 to 8.0 but when I do the final page doesn’t show (link below). It currently works as still running 7.4. The server company (one.com) says it is a problem with the theme. I don’t think it is the Enfold theme as it isn’t a problem where I have used it elsewhere. I suspect it is a problem with the child theme where there are additional files (includes and page-templates) to give the needed functionality. I did not write these files and I have very basic PHP knowledge. Can you suggest how I go about resolving the problem please? You have always managed to help me get to the bottom of things in the past.
Thanks
RobSeptember 20, 2022 at 1:31 pm #1365699Hi Rob,
Thanks for contacting us!
You are using the latest version of the theme which is compatible with PHP 8.0.x so I also do not think that the issue is theme related.
Would it be possible for you to duplicate your site on a testing installation, upgrade PHP version there and share WP admin and FTP logins with us privately so we can look into it?
Regards,
YigitSeptember 20, 2022 at 2:49 pm #1365709Thanks Yigit. Yes that makes sense. I have contacted the server company asking for a way to do this. I will reply here when it is set up. Cheers
September 20, 2022 at 3:04 pm #1365710September 21, 2022 at 12:02 am #1365781I love you guys!
I do this site for free as it is my local town and I think keeping the details of those who have died for us is so important.
I’ll let you know when I have a copy to look at.
ThanksSeptember 21, 2022 at 12:14 pm #1365815Hi,
We love you too!
To be honest, when I load a website, I directly go for debugging and look for the issue and do not pay much attention to the content but after reading your message, I checked the site again and I think it’s a great idea. I think people will appreciate it even more in the future :)
Best regards,
YigitSeptember 22, 2022 at 11:01 am #1365965Hi I tried using Duplicator plugin to by Snap Creek but as you can see it hasn’t worked properly. Front end isn’t loading properly and back end not accessible, Can you recommend another plugin or method to create it?
ThanksSeptember 22, 2022 at 11:14 am #1365968PS I just disabled Updraftplus and the backend is now working. Perhaps we can still use this as everything seems to work despite looking crap.
September 22, 2022 at 11:18 am #1365969Admin login
September 23, 2022 at 11:06 am #1366087Don’t do anything on this at the moment. I am trying to change it to PHP 8.0 to see if it fails. For some reasons the change hasn’t worked. I’ll let you know when it is ready for you.
September 23, 2022 at 1:16 pm #1366111Hi,
Sure, please let us know when you would like us to look into it :)
Best regards,
YigitSeptember 23, 2022 at 2:35 pm #1366132Hi guys it is now accessible with errors because I had to disable another plugin (wp-no-category-base).
When you go to the page (edwin-thomas-butcher) below you get this error.
Does this tell us anything?
Let me know if you want me to upload documents or send you FTP info.
Thanks
Rob
Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-content/themes/enfold-child/includes/loop-index.php:150 Stack trace: #0 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-content/themes/enfold-child/includes/loop-index.php(150): implode(‘, ‘, NULL) #1 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-includes/template.php(772): require(‘/home/cluster-s…’) #2 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-includes/template.php(716): load_template(‘/home/cluster-s…’, false, Array) #3 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-includes/general-template.php(204): locate_template(Array, true, false, Array) #4 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-content/themes/enfold/single.php(44): get_template_part(‘includes/loop’, ‘index’) #5 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-includes/template-loader.php(106): include(‘/home/cluster-s…’) #6 /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-blog-header.php(19): require_once(‘/home/cluster-s…’) #7 /home/cluster-sites/6/o/orionit.co.uk/public_html/index.php(17): require(‘/home/cluster-s…’) #8 {main} thrown in /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-content/themes/enfold-child/includes/loop-index.php on line 150September 23, 2022 at 3:00 pm #1366135Hi,
Could you please post FTP logins for your staging site as well? :)
Regards,
YigitSeptember 23, 2022 at 3:06 pm #1366138Thanks Yigit. No rush.
September 23, 2022 at 3:08 pm #1366140Hey,
FTP logins did not work for me. Could you please check them once again? :)
Cheers!
YigitSeptember 23, 2022 at 3:32 pm #1366144Sorry capital U at the end.
September 23, 2022 at 4:20 pm #1366148Hi,
I commented out following line /includes/loop-index.php file on your child theme and that helped
echo implode(', ', get_field('page_layout'));
Your staging site still has memory limit error and a warning related to one of your plugins but I assume you are having that issue when you update the theme on your live site? :)
Best regards,
YigitSeptember 23, 2022 at 5:07 pm #1366155Hi Yigit brilliant thanks I’ll try that on the live site next week and see if it works. I will need to notify the people who add the stories so they are hands off.
The staging site is on a crappy old server I have with 123-reg. I need to move to a newer one. The live site doesn’t have the resources issues so all the plugins work okay.
Please keep this open and I will let you know how I get on.
Thanks again.
RobSeptember 23, 2022 at 5:14 pm #1366157Hi,
You are welcome, Rob!
Sure, we will keep the thread open and it will be on hold. You can simply reply to this thread to re-open it :)
Best regards,
YigitSeptember 23, 2022 at 5:24 pm #1366162FYI Just found this. Don’t fully get it but it looks like the reason:
https://www.php.net/manual/en/function.implode.phpSeptember 23, 2022 at 6:06 pm #1366169Hi,
Thanks for sharing.
I did not see any change after commenting out the line but looking at the link, I think changing that line to following should also work
echo implode(get_field('page_layout'));
Best regards,
YigitSeptember 24, 2022 at 12:40 am #1366189You are a diamond! Thanks Yigit. I will do it Tuesday.
September 26, 2022 at 12:49 pm #1366351Hi Yigit,
FYI I just testedecho implode(get_field('page_layout'));
on the test site and I get this error:Parse error: syntax error, unexpected token “&” in /home/cluster-sites/6/o/orionit.co.uk/public_html/wp-content/themes/enfold-child/includes/loop-index.php on line 150
I am doing it tomorrow at 10am. I will use the commented one.
Thanks
RobSeptember 27, 2022 at 12:32 pm #1366527Hi Yigit,
Good news! The site appears to be working fine in PHP 8.0.2 with that line commented out. I have asked the users to go in and do their stuff and report back any anomalies.
Many many thanks in your help with this.
One final (hopefully) question. How did you find that error? Is there a tool I can use to check the PHP if this happens in future?
All the very best
RobSeptember 27, 2022 at 12:46 pm #1366530Hi Rob,
I’m glad to hear that the site is working fine!
You can enable debugging mode in WP by editing your wp-config.php file – https://wordpress.org/support/article/debugging-in-wordpress/ then check out which line in which file is causing the error. That is exactly what I did :)
Let us know if you have any other questions and enjoy the rest of your day!
Best regards,
YigitSeptember 27, 2022 at 12:56 pm #1366534Brilliant I’ll try that next time.
Muchos muchos gracias
Rob -
AuthorPosts
- The topic ‘Theme issue in PHP 8.0’ is closed to new replies.