Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #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
    Rob

    #1365699

    Hi 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,
    Yigit

    #1365709

    Thanks 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

    #1365710

    Hi,

    Great! We will keep the thread open and wait to hear from you :)

    Cheers!
    Yigit

    #1365781

    I 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.
    Thanks

    #1365815

    Hi,

    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,
    Yigit

    #1365965

    Hi 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?
    Thanks

    #1365968

    PS I just disabled Updraftplus and the backend is now working. Perhaps we can still use this as everything seems to work despite looking crap.

    #1365969

    Admin login

    #1366087

    Don’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.

    #1366111

    Hi,

    Sure, please let us know when you would like us to look into it :)

    Best regards,
    Yigit

    #1366132

    Hi 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 150

    #1366135

    Hi,

    Could you please post FTP logins for your staging site as well? :)

    Regards,
    Yigit

    #1366138

    Thanks Yigit. No rush.

    #1366140

    Hey,

    FTP logins did not work for me. Could you please check them once again? :)

    Cheers!
    Yigit

    #1366144

    Sorry capital U at the end.

    #1366148

    Hi,

    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,
    Yigit

    #1366155

    Hi 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.
    Rob

    #1366157

    Hi,

    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,
    Yigit

    #1366162

    FYI Just found this. Don’t fully get it but it looks like the reason:
    https://www.php.net/manual/en/function.implode.php

    #1366169

    Hi,

    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,
    Yigit

    #1366189

    You are a diamond! Thanks Yigit. I will do it Tuesday.

    #1366351

    Hi Yigit,
    FYI I just tested echo 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
    Rob

    #1366527

    Hi 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
    Rob

    #1366530

    Hi 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,
    Yigit

    #1366534

    Brilliant I’ll try that next time.
    Muchos muchos gracias
    Rob

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Theme issue in PHP 8.0’ is closed to new replies.