Deprecated message about htmlspecialchars() in HtmlView.php Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sat Oct 22, 2022 8:14 pm

During some install issues with the shopping software I use...I saw this warning and I cannot figure out what to do about it as I'm still learning Joomla (it was 2 but I figured out one myself...yay).

First one is this...

Code: Select all

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/staging1.ariesgamesandminis.com/public_html/libraries/src/MVC/View/HtmlView.php on line 387
Any help would be appreciated.
Last edited by toivo on Sat Oct 22, 2022 8:45 pm, edited 1 time in total.
Reason: mod note: moved from 3.x General Questions, retitled

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9914
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by AMurray » Sat Oct 22, 2022 10:20 pm

More information please:
  • What specific Joomla version?
  • What shopping extension?
  • What specific PHP version are you using?
It seems whatever extension it is, it's not fully compatible with your PHP version (whatever that might be). Although "Deprecated" is just a warning. Does the extension otherwise work?

Please use the FPA (red box above) to provide that information; run the script, post the report results here.
Regards - A Murray
General Support Moderator

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sat Oct 22, 2022 10:28 pm

The only reason I caught this was because I had to turn on debugging. That's when I noticed this while I was having issues with a HikaShop upgrade. The folder this is in is not for HikaShop...so it's something to do with Joomla.

PHP is 8.0.xx...I want to say it's .43 but don't quote me on that. I was on 8.1.xx but that was causing some issues so I had to have it stepped back because Siteground auto updated my site (now I'm on manual updates).

Joomla is 3.10.11

As for what the extension is...I have no clue. Hence why I came here looking for help

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31084
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Per Yngve Berg » Sat Oct 22, 2022 11:40 pm

You can identify the extension by looking at the stack trace.

The Core Library Function is failing because of bad input from an extension.

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sat Oct 22, 2022 11:46 pm

Per Yngve Berg wrote: Sat Oct 22, 2022 11:40 pm You can identify the extension by looking at the stack trace.

The Core Library Function is failing because of bad input from an extension.
I have no idea what that means or how to do that.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31084
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Per Yngve Berg » Sun Oct 23, 2022 12:04 am

The stack trace is in the debugging info at the bottom og the Page when Debug is enabled.

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sun Oct 23, 2022 2:14 am

Per Yngve Berg wrote: Sun Oct 23, 2022 12:04 am The stack trace is in the debugging info at the bottom og the Page when Debug is enabled.
I cannot tell what is what...it's all info I don't understand. I'm not experienced like you guys. Can you please provide some direction on being able to tell where to find the info that says what extension would be the issue?

I open all the debugging options at the bottom and try to search for the HTLMViewer.php and tons of things come up.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9914
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by AMurray » Sun Oct 23, 2022 3:57 am

That's why we're asking you to post the information to the forum here so we can help with that.

Just post the entire list of whatever you see - copy and paste it to a new reply on this thread.

You don't know where you downloaded the e-shopping extension? Many have a "powered by [such and such] at the bottom of the pages it generates, like "Powered by JoomShopping" or "Powered by VirtueMart". That should give you some clue. The download package itself also gives you an idea what it is, the package is normally something like "com_joomshopping.zip" meaning the Component extension called Joom Shopping.
Regards - A Murray
General Support Moderator

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sun Oct 23, 2022 3:18 pm

AMurray wrote: Sun Oct 23, 2022 3:57 am That's why we're asking you to post the information to the forum here so we can help with that.

Just post the entire list of whatever you see - copy and paste it to a new reply on this thread.

You don't know where you downloaded the e-shopping extension? Many have a "powered by [such and such] at the bottom of the pages it generates, like "Powered by JoomShopping" or "Powered by VirtueMart". That should give you some clue. The download package itself also gives you an idea what it is, the package is normally something like "com_joomshopping.zip" meaning the Component extension called Joom Shopping.
I never said I don't know who the shopping component is...I even mentioned it in my second post as HikaShop. This issue I'm talking about caught my eye when I turned on debugging while having issues with HikaShop...not that it was because of HikaShop.

I don't know what you're asking for here. I've posted what I saw. As you asking me to copy & paste everything from the debugging area? I need specifics otherwise I don't know what you're asking for.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17516
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by toivo » Sun Oct 23, 2022 7:55 pm

In addition to turning the Debug option on and setting Error Reporting to 'Maximum' in the Global Configuration, go to Extensions - Plugins and configure the plugin System - Debug so that 'Allowed Groups' contains the name of the user group you use for testing and 'Log Almost Everything' is selected in the Logging tab.

The error message and the stack trace will now be written to a log file administrator/logs/everything.php. Copy and paste the relevant lines from the test into your reply for advice.
Toivo Talikka, Global Moderator

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Sun Oct 23, 2022 8:22 pm

toivo wrote: Sun Oct 23, 2022 7:55 pm In addition to turning the Debug option on and setting Error Reporting to 'Maximum' in the Global Configuration, go to Extensions - Plugins and configure the plugin System - Debug so that 'Allowed Groups' contains the name of the user group you use for testing and 'Log Almost Everything' is selected in the Logging tab.

The error message and the stack trace will now be written to a log file administrator/logs/everything.php. Copy and paste the relevant lines from the test into your reply for advice.
Thank you I will try that tonight or tomorrow as 2 of my kids have gotten sick today...but I've had issues with Maximum setting before locking up my site so it may not work, however that could have been due to other issues that have already been resolved. I haven't tried that since.

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Mon Oct 24, 2022 12:19 am

So the attached picture is what happens when I set the debugging to maximum. This is what was happening before too which I thought was due to being on PHP 8.1.x
You do not have the required permissions to view the files attached to this post.

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Tue Oct 25, 2022 12:19 pm

OK so I spoke again to HikaShop on another issue, and they said that this issue I originally reported here is supposed to be a "Joomla check" function but it is showing because of PHP 8...however he knew how to fix it so he did a patch & I uploaded it, so this issue is resolved.

I'll make another post about the Maximum Debug issue I have. Thank you

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17516
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by toivo » Wed Oct 26, 2022 7:49 am

Dragon41673 wrote: Tue Oct 25, 2022 12:19 pmthey said that this issue I originally reported here is supposed to be a "Joomla check" function but it is showing because of PHP 8...however he knew how to fix it so he did a patch & I uploaded it
Which "Joomla check" function? Which file was patched? Hopefully not any core files in Joomla, because the next update will overwrite the modification.
Toivo Talikka, Global Moderator

User avatar
Dragon41673
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 240
Joined: Tue Sep 25, 2012 3:33 am

Re: Deprecated message about htmlspecialchars() in HtmlView.php

Post by Dragon41673 » Wed Nov 02, 2022 8:54 pm

toivo wrote: Wed Oct 26, 2022 7:49 am
Dragon41673 wrote: Tue Oct 25, 2022 12:19 pmthey said that this issue I originally reported here is supposed to be a "Joomla check" function but it is showing because of PHP 8...however he knew how to fix it so he did a patch & I uploaded it
Which "Joomla check" function? Which file was patched? Hopefully not any core files in Joomla, because the next update will overwrite the modification.
Sorry...I have no idea and I did not get a notification that this message was even posted, so sorry about the delay in answering.


Locked

Return to “Extensions for Joomla! 3.x”