Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 13d 05h 35m 52s
Claim 50% off
Solved Templates

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

Asked by Bill Clements 2 years ago Last activity 2 years 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.

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff

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

21 more replies

Paul Frankowski Senior Staff

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.

Bill Clements Asked this

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.

Bill Clements Asked this

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

Paul Frankowski Senior Staff

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.

Bill Clements Asked this

I am looking at it on my screen.

Paul Frankowski Senior Staff
2 years ago · edited

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.

Bill Clements Asked this

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

Paul Frankowski Senior Staff

I understand, but hard to believe. ;p

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

Bill Clements Asked this

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

Paul Frankowski Senior Staff

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.

Log in to reply.