Deprecated Warning After Php And Components Update - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Deprecated Warning After Php And Components Update

G

gemmajoom

Template 2 years ago

Error after php (8.1) and components update

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/sitename.it/public_html/templates/shaper_hope/html/layouts/chromes/sp_xhtml.php on line 28

Warning appears only on some pages and remains visible even if I deactivate the error report.

The error remains even if I try to go back to the previous version of the php (8.0).

0
6 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #141466

I have idea that may work:

  1. Download Helix3 template/quickstart
  2. Take from it that file: templates/shaper_helix3/html/layouts/chromes/sp_xhtml.php
  3. Using FTP override file here: templates/shaper_hope/html/layouts/chromes/sp_xhtml.php
0
G
gemmajoom
Accepted Answer
1 year ago #143046

ThankYou Paul, it works now!

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #128795

Hello gemmajoom

Apology for the inconvenience. I cannot see any warning or error on the page now. Please share your administrator access here to check the issue. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup with you before sharing.

Best regards

0
G
gemmajoom
Accepted Answer
2 years ago #128984

Not being able to leave the site in production with this error, a restore to the previous version was made. I confirm that the error occurs by updating the php to version 8.1, while with 8.0 everything seems ok.

We have it locally and I can report the full error statement below:

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #129022

Hope template is not compatible with PHP 8.1. Please use PHP 8.0 on the template. We will update it soon.

Please accept the answer that helped you. It will be then easier to find the solution for the other users with the same issue. There is a button to accept answer after each comment.

0
AC
Alessandro Coraglia
Accepted Answer
1 year ago #141462

hi, do you have any updates on Newsberg? I have a massive list of deprecated content, and I am using Joomla 4, which now requires PHP 8+.

I can hide the report errors, but still, the code is unsafe (as it's deprecated)

0