Melvin Template Error: Deprecated: Htmlspecialchars(): Passing Null To Parameter #1 ($string) Of Type String is Deprecated In Templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php On Line 28 - Question | JoomShaper

Melvin Template Error: Deprecated: Htmlspecialchars(): Passing Null To Parameter #1 ($string) Of Type String is Deprecated In Templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php On Line 28

BC

Bill Clements

Template 2 months ago

Using V2 of Melvin Template with latest version of PageBuilder 5.2.6 and getting these errors after upgraded to Joomla 4.4.2 on PHP 8.2.

  1. Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php on line 28

  2. Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in templates/shaper_melvin/html/com_content/category/blog_item.php on line 30

Can you please help me resolve these? My site is down until this is fixed.

0
22 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149024

In that case by now edit that file:

templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php

And after line 9 defined('_JEXEC') or die;

Add in new line 10: error_reporting(E_ERROR | E_PARSE);

and save changes

info_2296_2024.jpg

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #148984

Hi Bill, those are only warnings related with PHP 8.2 version. In general you should wait for offcial update or hide it using Global Configuration options.

But there is "hack/tip" that may help:

  1. Download Helix3 quickstart or template package
  2. Unzip it
  3. And using FTP tool override those two files using files from Helix3 template.

It should help. In case of problems with design after 2nd file change, let me know.

0
BC
Bill Clements
Accepted Answer
2 months ago #149023

I did as yo suggested. Issue #2 with blog_item.php has been resolved with this update BUT there is still an issue with sp_xhtml.php on line 28.

I have a version of this site running with Joomla 3.10.x with same PHP, etc. and I am not receiving (or seeing) that error.

Your assistance with this would be greatly appreciated.

0
BC
Bill Clements
Accepted Answer
2 months ago #149025

Updated as suggested, cleared cache and stlll have the same error.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149026

That one?

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php on line 28

Impossible.

0
BC
Bill Clements
Accepted Answer
2 months ago #149028

I am looking at it on my screen.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149029

Last try:

edit line 29 where is "echo...."

and change into

echo '<' . $moduleTag . ' class="sp-module '. $moduleClass . ' ">';

yes, a short version! In theory it should help. But wait 3min - maybe server has file change.

0
BC
Bill Clements
Accepted Answer
2 months ago #149030

updated ... cleared cache but no change. Same message.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149031

I understand, but hard to believe. ;p

also becuase you should see error in line 29, not 28 if you added extra line, right.

0
BC
Bill Clements
Accepted Answer
2 months ago #149032

Not sure what to say ... I am still getting the same message.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149033

Sorry, I lost hope for today.

Are you sure that you made changes that I asked. Please open file in edit mode again, and show me screenshot or video link.

0
BC
Bill Clements
Accepted Answer
2 months ago #149034

I am seeing the error. Unless Chrome is really holding onto something in cache, I am not sure.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149035

Thanks,

but show me FILE CODE (screenshot link)


Sorry, but something is (must be) wrong.

0
BC
Bill Clements
Accepted Answer
2 months ago #149036

Not sure what you are asking for - CODE LINK??

0
BC
Bill Clements
Accepted Answer
2 months ago #149037

When I updated the blog_item.php file that corrected that problem.

I have a screenshot but how can I include that image in this post?

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149038

Open that file: templates/shaper_melvin/html/layouts/chromes/sp_xhtml.php

in editor that you used to make changes, and make screenshot, then share link to image to show me what you did. As I did to show you what should be done.

Sorry, I have to be sure.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149039

What is relation with "sp_xhtml.php" file? We have to fix different file, different view.

0
BC
Bill Clements
Accepted Answer
2 months ago #149040

What "elink"??? This is on the host server. How do I share this????

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149041

Yes, for example, upload on your server. Copy URL and share.

OR use: https://imgbb.com/

0
BC
Bill Clements
Accepted Answer
2 months ago #149042

Okay ... this must have been held in cache somewhere because it is no longer showing the error.

0
BC
Bill Clements
Accepted Answer
2 months ago #149043

Those edit did solve the problem. Thank you!

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 months ago #149044

I told you, hahhah.

Ufff... You're welcome.

That's why I said it's almost not possible, I used this methods even today twice, and fixed issue.

0