Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plate and PHP 8.2 #24

Closed
hellodavesweden opened this issue Feb 1, 2024 · 4 comments
Closed

Plate and PHP 8.2 #24

hellodavesweden opened this issue Feb 1, 2024 · 4 comments

Comments

@hellodavesweden
Copy link

Our hosting provided force upgraded PHP to 8.2 and it more or less broke everything regarding Plate theme. Got a few error messages that obviously needs to be fixed... to begin with most likely:

Fatal error: Uncaught Error: Call to undefined function create_function() in /customers/e/7/a/monolitsports.com/httpd.www/wp-content/themes/plate/functions.php:1123 Stack trace: #0 /customers/e/7/a/monolitsports.com/httpd.www/wp-settings.php(611): include() #1 /customers/e/7/a/monolitsports.com/httpd.www/wp-config.php(98): require_once('/customers/e/7/...') #2 /customers/e/7/a/monolitsports.com/httpd.www/wp-load.php(50): require_once('/customers/e/7/...') #3 /customers/e/7/a/monolitsports.com/httpd.www/wp-admin/admin.php(34): require_once('/customers/e/7/...') #4 /customers/e/7/a/monolitsports.com/httpd.www/wp-admin/customize.php(13): require_once('/customers/e/7/...') #5 {main} thrown in /customers/e/7/a/monolitsports.com/httpd.www/wp-content/themes/plate/functions.php on line 1123

@joshuaiz
Copy link
Owner

joshuaiz commented Feb 1, 2024

Thanks for this - will get this updated as soon as I can.

@joshuaiz
Copy link
Owner

joshuaiz commented Feb 2, 2024

Hi @hellodavesweden I've just made a few small updates and tested on PHP 8.2 with a super minimal setup and everything is working without errors:

CleanShot 2024-02-01 at 23 53 30@2x

CleanShot 2024-02-01 at 23 52 49@2x

First thing to note is I have updated the default branch to main from master.

When I fired up Local and ran Plate with PHP 8.2 I had only one small error which I have fixed:

In admin.php on line 68, headertitle was changed to headertext. That was the only update needed.

Also note that the error you cited was caused by a call to create_function() which does not exist in the Plate code so perhaps it was added by you or someone else?

I would check that and make the edit in admin.php and see if that resolves it.

If not, I would do the following before updating Plate:

  • do a complete backup of your db and all files
  • do a separate backup of your Plate theme folder (just in case)
  • ensure WP core and all plugins are up-to-date (important)
  • download the latest Code zip from this repo, not the latest release The latest release is not up to date.
  • depending on how you have made customizations to Plate, that will determine how to proceed. If you used a Child Theme, just update Plate; if you customized it directly, I would use a diff program and add anything different file-by-file.

Let me know how it goes...if you're stuck let me know and I can try to help!

@hellodavesweden
Copy link
Author

Hello Joshuaiz

Thank you, this seems to have solved the problem and everything is working just fine agan,

Have no words for the incredible fast response and solving the issue, very graceful for that.

@joshuaiz
Copy link
Owner

@hellodavesweden glad this resolved your issue. Going to close this but if anything else comes up don't hesitate to file another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants