BUG? Deprecated PHP function mb_strpos() Topic is solved

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Thu Nov 30, 2023 3:04 am

Using the Joomla 4.4.1 with PHP 8.2

On this page: https://avmonline.com/avmllc/index.php/contacts

There are 2 messages:

Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in (redacted)/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 41

Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in (redacted)/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 41

I'm not sure what is causing that to appear so I'm unable to determine the solution.

Thanks.
Last edited by toivo on Tue Dec 05, 2023 10:56 pm, edited 1 time in total.
Reason: mod note: moved from 4.x Coding

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Thu Nov 30, 2023 3:32 am

It's a PHP 8.1/8.2 issue.

In my testings, I rolled PHP back to 8.1. The messages remained. I then rolled back to PHP 8.0 and the messages disappeared.

I have since rolled PHP forwarded to 8.2 so you can see the error messages

Thanks.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by Per Yngve Berg » Thu Nov 30, 2023 5:36 am

Enable Debug and get the Stack Trace. That will reveal the incompatible extension.

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Sun Dec 03, 2023 4:16 pm

Sorry for slow response.

I enabled the debug and could see the debug console but I'm not sure where I can get a stack trace.

Joomla documentation is a little light on the details on how to do it.

Thanks again.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by toivo » Mon Dec 04, 2023 2:18 am

nice2odie wrote:
Sun Dec 03, 2023 4:16 pm
II'm not sure where I can get a stack trace.
It pops up automatically when an error occurs.

If you go to the Logging tab in Global Configuration and turn on 'Log Almost Everything', the error messages and the PHP call stack will get written into the log file administrator/logs/everything.php.
Toivo Talikka, Global Moderator

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Mon Dec 04, 2023 7:43 pm

Thanks for the tip. I had the folder pointing to a different folder which explained why I couldn't find the file.

It generated 2 files. Prior to uploading them, I changed the extension to .log. The deprecated.php file is too large to upload. I split it into half and it was still too large. so it's not attached. everything.php (everything.log) is attached.

Also, I'm using Joomla's default template, Cassatovia

jp
You do not have the required permissions to view the files attached to this post.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by AMurray » Mon Dec 04, 2023 9:50 pm

That's file contains the installation log, but it doesn't help solve your posted issue as far as I can see. We need the stack trace so that you can see the errors on the screen when you load the web page with the problem. The home page with those deprecated errors should show the stack track when "Debug" is set to "on".

There's only one file - is there supposed to be another attachment to your reply above?
Regards - A Murray

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 5:53 pm

AMurray wrote:
Mon Dec 04, 2023 9:50 pm
That's file contains the installation log, but it doesn't help solve your posted issue as far as I can see. We need the stack trace so that you can see the errors on the screen when you load the web page with the problem. The home page with those deprecated errors should show the stack track when "Debug" is set to "on".

There's only one file - is there supposed to be another attachment to your reply above?
The "everything.log" file is not the installation log file. Debug created that file (with a php extension) and the deprecated.php after I turned debug on and refreshed the offending page. I changed the extension from php to log ..that's the only thing I did to the file before uploading it here.

In my reply post I mentioned that the deprecated.php file was too large to upload here. I attempted to split it into 2 parts and both were still too large. I did not want to waste my time to split the files down more.

The error message only show up on the Contacts page -- no where else. Here's a direct link: https://avmonline.com/avmllc/index.php/contacts

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by Per Yngve Berg » Tue Dec 05, 2023 6:34 pm

Did you set Error Reporting = 'maximum'?

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 6:40 pm

Per Yngve Berg wrote:
Tue Dec 05, 2023 6:34 pm
Did you set Error Reporting = 'maximum'?
Yes.

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 6:43 pm

BTW The deprecated.php file is 4.6MB with over 18,000 lines.

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: BUG? Deprecated PHP function mb_strpos()

Post by nacc » Tue Dec 05, 2023 7:05 pm

1) Deprecated PHP function mb_strpos() is not a "bug" in J! 4.4.1. If everyone who uses the Contacts component had this error then I think we would be seeing J! 4.4.2 released extra quickly! The problem you're having is that this message is concealing the root cause of something else on your Contacts page; I don't know what that "something else" is. The something else could be a third-party module or plugin that you're using on your Contacts page.

2) It's your website it's not mine or anyone else's and, if you don't have the time to look at a few lines in a logfile then there's nothing we can do to help you. We don't want to see hundreds of thousands of lines from a logfile; the most-recent ten or so lines will probably do.

3) This is not a "coding" question. This looks more like a problem involving the use of third-party extensions that are not compatible with PHP 8.2 and/or J! 4.4.1. It may help to look at what third-party extensions you have installed and the Forum Post Assistant reporting tool could probably assist all of us.

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 8:05 pm

FYI: I am getting a little frustrated and the same time I know you are trying to help.

Look at the bolded and italicized error message that showed up on the Contacts page:

Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/avmonlin/public_html/avmllc/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 41

That tells me J! is using the deprecated function

I'm on the J! Next Update (it's showing 5.01) but I'm not ready to go that far yet because the web hosting company needs to update MySQL first to support J! 5.x.

In one of my replies, I said that the function is deprecated in PHP 8.2. The error messages disappear when I go back to PHP 8.0.

Now, to respond to the specific statements

1) I've disabled 2 extensions related to contacts and the error message still shows up. I went ahead and uninstalled those 2 (module and plugin) -- and yet the error messages remain.

2) The System Debug generated the 4.6MB file/18+K lines in 2 seconds after I refreshed the one single page. I will paste the last 20 lines in my next message. I'm not a PHP programmer and I'm just a volunteer webmaster. The website's owner has NO clue on website CMS or anything and is not a programmer of any kind. I can make the time, but I'd rather be chatting with a person using DM/PM or whatever than using this forum. No one has offered the opportunity to work together.

3) I agree. I'm starting to think that the J1 uninstall is not really cleaning things up completely. i even clicked on the button the reload the current J! 4.4.1 files.

Thank you once again.

jp

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 8:10 pm

Here's the last 30+ lines of the deprecated.php file:
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Since joomla/database 2.0.0: Joomla\Database\DatabaseDriver::getInstance() is deprecated and will be removed in 3.0, use Joomla\Database\DatabaseFactory::getDriver() instead. - [ROOT]/libraries/vendor/symfony/deprecation-contracts/function.php - Line 25
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getDbo() is deprecated. Load the database from the dependency injection container. - [ROOT]/libraries/src/Factory.php - Line 453
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getDbo() is deprecated. Load the database from the dependency injection container. - [ROOT]/libraries/src/Factory.php - Line 453
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Method Joomla\CMS\MVC\Model\BaseDatabaseModel::dispatchEvent is deprecated and will be removed in 6.0. Use getDispatcher()->dispatch() directly. - [ROOT]/libraries/src/MVC/Model/BaseDatabaseModel.php - Line 378
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getUser() is deprecated. Load the user from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getIdentity(). - [ROOT]/libraries/src/Factory.php - Line 363
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getDbo() is deprecated. Load the database from the dependency injection container. - [ROOT]/libraries/src/Factory.php - Line 453
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Database is not available in constructor in 6.0. - [ROOT]/libraries/src/MVC/Model/BaseDatabaseModel.php - Line 110
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated User ID must be an integer in Joomla\Component\Actionlogs\Administrator\Model\ActionlogModel::addLog. - [ROOT]/administrator/components/com_actionlogs/src/Model/ActionlogModel.php - Line 55
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated User must be set in Joomla\CMS\User\CurrentUserTrait::getCurrentUser. This will not be caught anymore in 6.0 - [ROOT]/libraries/src/User/CurrentUserTrait.php - Line 44
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). - [ROOT]/libraries/src/Factory.php - Line 295
2023-12-04T19:23:09+00:00 WARNING 66.173.7.5 deprecated Joomla\CMS\Factory::getDbo() is deprecated. Load the database from the dependency injection container. - [ROOT]/libraries/src/Factory.php - Line 453

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: BUG? Deprecated PHP function mb_strpos()

Post by nacc » Tue Dec 05, 2023 8:20 pm

Yes, yes, yes ... we know the details of the message text. I often get error messages that say something like "You've got a PHP error somewhere when I was trying to do something you wanted me to do, and this is the point at which I threw up my hands in surrender and said, 'I'm not going to do this any more'." And the error message doesn't tell me anything more than I wrote something (perhaps a misplaced comma or goodness-knows-what) and doesn't really help me at all.

The fact that you have 4.6Mb of log file (and growing every second) simply indicates that you have an untrapped situation happening and this logfile will just grow and grow and never stop until you do something about it. But what to do? Well, as I wrote before, you could look at the most recent dozen lines in that file and see if there's anything "revealing" in that information. I don't know; I don't have X-ray vision.

I wouldn't get too enthusiastic about using "Joomla! Next" if your J! 4.4.1 website is tossing you a cascade of deprecated warnings. Migrating from J! 4.x to J! 5.x won't cure those problems.

I started writing this reply before I read the latest information about the litany of "GetLanguage" warnings.

OK, so you have warnings about some language package you're using as well as database problems. I don't know anything about those things.

I wrote before that it may help to use the Forum Post Assistant diagnostic tool to see what possible "optional" extensions you've installed. I'll leave that to you do decide whether that's something you're interested in doing.

Just trying to help here. :)

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Tue Dec 05, 2023 8:32 pm

I'm smiling here. It just means that we all are butting heads here.

The only language I have on the website is US/UK.

I turned off the debug after the files were generated. This is what I did
1) Turned on Debug, set reporting to max
2) in a separate Chrome browser tab, reloaded the Contacts (the one that is showing the error messages) page
3) Debug generated 2 files everything.php and deprecated.php
4) I turned off Debug [since this is a live (aka production) website].

I also looked at the HTML code that J! rendered for that page to see if there were some additional clues but I didn't find any that jumped out at me.

I will look into the FPA later tonight. I have to take a break now.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by toivo » Wed Dec 06, 2023 12:17 am

Deprecated messages like this one, warning about an empty input parameter to the PHP native function mb_strpos(), come up when new versions of PHP like PHP 8.2 start flagging inconsistencies and oversights in the PHP source code, in an attempt to assist programmers to avoid oversights that cause bugs.

It is possible to suppress Deprecated messages. Set 'Error Reporting' in Global Configuration to 'Simple' or 'None', which is the recommended setting for live production sites.

In this particular case, it would be interesting to identify the root cause, in other words, where in Joomla and third party extensions the empty input parameter comes from because the Joomla Contact List does not normally display Deprecated messages.

Deprecated messages do not cause the PHP call stack to be generated, which would identify the culprit. However, it is possible to use a trick and force a PHP error before an invalid value is passed on to the function mb_strpos() so that a PHP call stack is generated.

Edit the file libraries/vendor/joomla/string/src/phputf8/mbstring/core.php. Add the following lines between lines 40 and 41:

Code: Select all

		// debug
		if (is_null($str)) {
			trigger_error("mb_strpos with haystack = [ " . $str . " ]", E_USER_NOTICE);
		}
		// debug end
This code will display a message with the PHP call stack, which will identify the script where the null value originates from. Copy and paste the call stack here.
Toivo Talikka, Global Moderator

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Wed Dec 06, 2023 3:09 am

I added the debug code and refreshed the Contacts page. I took a screenshot...it didn't reveal the underlying offending call.

See attached screenshot.

I'm giving up trying to figure out the error source so I changed the error level to None as recommended for a production site. The deprecated message is gone, but it's still getting logged in the PHP error log file on the server.

Thanks for all your help!

Happy Holidays!

jp
You do not have the required permissions to view the files attached to this post.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by toivo » Wed Dec 06, 2023 4:09 am

The screenshot shows that the extra code caught the empty string but for some reason the PHP call stack was not generated.

Does your server not have the PHP extension Xdebug enabled? Go to cPanel or a similar page, provided by your host. The option 'Select PHP version' usually has a page that lists all the PHP extensions.
Toivo Talikka, Global Moderator

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Wed Dec 06, 2023 4:25 am

I will look into that tomorrow (Wed). It's late here for me to think/do anything with a brain that is shutting down. :)

In my previous reply, I forgot to attach the FPA file. I attempted to attach the 11.8MB PDF file but it is too large. I then zipped it up and it's still too large at 9.1MB.

I didn't see anything that jumped out at me. May be that I'm not looking in the correct places. :(

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by toivo » Wed Dec 06, 2023 4:30 am

Please follow the instructions and copy and paste the FPA results into your reply. Make sure that BBCode is not disabled.
Toivo Talikka, Global Moderator

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: BUG? Deprecated PHP function mb_strpos()

Post by nacc » Wed Dec 06, 2023 4:31 am

nice2odie wrote:
Wed Dec 06, 2023 4:25 am
I forgot to attach the FPA file. I attempted to attach the 11.8MB PDF file but it is too large.
Please do not waste your time taking a "screenshot" of the FPA report and attempt to attach it as a PDF. That's not how it's done.

It's fairly straightforward: on the FPA report page is a "Generate Report" button that creates BBcode suitable for copying and pasting directly as a forum post here. The instructions for use (if you're unsure) are at steps 5 and 6 on https://forumpostassistant.github.io/docs/

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Thu Dec 07, 2023 4:47 pm

I forgot to do this last night ...so I did it this morning.
Forum Post Assistant (v1.6.6) : 7-Dec-2023 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 4.4.1-Stable (Pamoja) 28-November-2023
Joomla! Configured :: Yes | Read-Only (444) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: false | .htaccess/web.config: No | GZip: false | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 15 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: maximum | Site Debug: true | Language Debug: false | Default Access: Public | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 4.4.1: Yes | Database Supports J! 4.4.1: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: Linux | OS Version: 4.19.286-203.ELK.el7.x86_64 | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate, br | System TMP Writable: Yes | Free Disk Space : 76.71 GiB |

PHP Configuration :: Version: 8.2.13 | PHP API: litespeed | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 22519 | Log Errors To: error_log | Last Known Error: 05th December 2023 19:49:30. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 512M | Max. POST Size: 516M | Max. Input Time: 60 | Max. Execution Time: 60 | Memory Limit: 512M

Database Configuration :: Version: 5.7.23-23 (Client:mysqlnd 8.2.13) | Database Size: 6.61 MiB | #of Tables with config prefix:  87 | #of other Tables:  0 | User Privileges : GRANT ALL
Detailed Environment :: wrote:PHP Extensions :: Core (8.2.13) | date (8.2.13) | libxml (8.2.13) | openssl (8.2.13) | pcre (8.2.13) | zlib (8.2.13) | filter (8.2.13) | hash (8.2.13) | json (8.2.13) | pcntl (8.2.13) | random (8.2.13) | readline (8.2.13) | Reflection (8.2.13) | SPL (8.2.13) | session (8.2.13) | standard (8.2.13) | litespeed () | bcmath (8.2.13) | bz2 (8.2.13) | calendar (8.2.13) | ctype (8.2.13) | curl (8.2.13) | dom (20031129) | mbstring (8.2.13) | fileinfo (8.2.13) | ftp (8.2.13) | gd (8.2.13) | gettext (8.2.13) | gmp (8.2.13) | iconv (8.2.13) | imap (8.2.13) | intl (8.2.13) | exif (8.2.13) | mysqlnd (mysqlnd 8.2.13) | odbc (8.2.13) | PDO (8.2.13) | pgsql (8.2.13) | Phar (8.2.13) | posix (8.2.13) | pspell (8.2.13) | SimpleXML (8.2.13) | soap (8.2.13) | sockets (8.2.13) | sodium (8.2.13) | sqlite3 (8.2.13) | tidy (8.2.13) | tokenizer (8.2.13) | xml (8.2.13) | xmlwriter (8.2.13) | xsl (8.2.13) | zip (1.21.1) | mysqli (8.2.13) | pdo_mysql (8.2.13) | PDO_ODBC (8.2.13) | pdo_pgsql (8.2.13) | pdo_sqlite (8.2.13) | xmlreader (8.2.13) | apcu (5.1.22) | imagick (3.5.0) | Zend OPcache (8.2.13) | Zend Engine (4.2.13) |
Potential Missing Extensions ::

Switch User Environment :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (---) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) | api/ (755) |

Elevated Permissions (First 10) ::
Database Information :: wrote:Database statistics :: Uptime: 4092523 | Threads: 7 | Questions: 2897975777 | Slow queries: 0 | Opens: 97649122 | Flush tables: 1 | Open tables: 20000 | Queries per second avg: 708.114 |
Extensions Discovered :: wrote:Components :: Site ::
Core ::
3rd Party:: WF_AGGREGATOR_DAILYMOTION_TITLE (2.9.55) ? | WF_AGGREGATOR_[youtube]_TITLE (2.9.55) ? | WF_AGGREGATOR_VIMEO_TITLE (2.9.55) ? | WF_AGGREGATOR_AUDIO_TITLE (2.9.55) ? | WF_AGGREGATOR_VIDEO_TITLE (2.9.55) ? | WF_LINKS_JOOMLALINKS_TITLE (2.9.55) ? | WF_POPUPS_JCEMEDIABOX_TITLE (2.9.55) ? | WF_LINK_SEARCH_TITLE (2.9.55) ? | WF_FILESYSTEM_JOOMLA_TITLE (2.9.55) ? | WF_FONTSIZESELECT_TITLE (2.9.55) ? | WF_LINK_TITLE (2.9.55) ? | WF_LANGCODE_TITLE (2.9.55) ? | WF_ATTRIBUTES_TITLE (2.9.55) ? | WF_LISTS_TITLE (2.9.55) ? | WF_TABLE_TITLE (2.9.55) ? | WF_PREVIEW_TITLE (2.9.55) ? | WF_FONTSELECT_TITLE (2.9.55) ? | WF_EMOTIONS_TITLE (2.9.55) ? | WF_VISUALCHARS_TITLE (2.9.55) ? | WF_FULLSCREEN_TITLE (2.9.55) ? | WF_SEARCHREPLACE_TITLE (2.9.55) ? | WF_VISUALBLOCKS_TITLE (2.9.55) ? | WF_CHARMAP_TITLE (2.9.55) ? | WF_STYLE_TITLE (2.9.55) ? | WF_IMGMANAGER_TITLE (2.9.55) ? | WF_MEDIA_TITLE (2.9.55) ? | WF_FONTCOLOR_TITLE (2.9.55) ? | WF_CONTEXTMENU_TITLE (2.9.55) ? | WF_ARTICLE_TITLE (2.9.55) ? | WF_CLIPBOARD_TITLE (2.9.55) ? | WF_STYLESELECT_TITLE (2.9.55) ? | WF_FORMATSELECT_TITLE (2.9.55) ? | WF_DIRECTIONALITY_TITLE (2.9.55) ? | WF_AUTOSAVE_TITLE (2.9.55) ? | WF_BROWSER_TITLE (2.9.55) ? | WF_PRINT_TITLE (2.9.55) ? | WF_HELP_TITLE (2.9.55) ? | WF_HR_TITLE (2.9.55) ? | WF_NONBREAKING_TITLE (2.9.55) ? | WF_KITCHENSINK_TITLE (2.9.55) ? | WF_SPELLCHECKER_TITLE (2.9.55) ? | WF_ANCHOR_TITLE (2.9.55) ? | JCE - Noneditable (1.0.0) ? | WF_REFERENCE_TITLE (2.9.55) ? | WF_WORDCOUNT_TITLE (2.9.55) ? | WF_CLEANUP_TITLE (2.9.55) ? | WF_TEXTCASE_TITLE (2.9.55) ? |

Components :: Admin ::
Core :: com_admin (4.0.0) 1 | com_login (4.0.0) 1 | com_installer (4.0.0) 1 | com_redirect (4.0.0) 1 | com_config (4.0.0) 1 | com_joomlaupdate (4.0.3) 1 | com_actionlogs (3.9.0) 1 | com_newsfeeds (4.0.0) 1 | com_workflow (4.0.0) 1 | com_ajax (4.0.0) 1 | com_finder (4.0.0) 1 | com_cpanel (4.0.0) 1 | com_templates (4.0.0) 1 | com_guidedtours (4.3.0) 1 | com_languages (4.0.0) 1 | com_privacy (3.9.0) 1 | com_checkin (4.0.0) 1 | com_content (4.0.0) 1 | com_modules (4.0.0) 1 | com_contenthistory (4.0.0) 1 | com_banners (4.0.0) 1 | com_users (4.0.0) 1 | com_media (3.0.0) 1 | com_categories (4.0.0) 1 | com_scheduler (4.1.0) 1 | com_tags (4.0.0) 1 | com_postinstall (4.0.0) 1 | com_messages (4.0.0) 1 | com_cache (4.0.0) 1 | com_menus (4.0.0) 1 | com_wrapper (4.0.0) 1 | com_plugins (4.0.0) 1 | com_mails (4.0.0) 1 | com_associations (4.0.0) 1 | com_fields (4.0.0) 1 |
3rd Party:: com_akeebabackup (9.8.3) 1 | Slideshow CK (2.5.0) 1 | com_slideshowck (2.5.1) 1 | COM_JCE (2.9.55) 1 | com_jaextmanager (2.5.3) 1 | com_jaextmanager (2.7.5) 1 |

Modules :: Site ::
Core :: mod_languages (3.5.0) 1 | mod_wrapper (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_articles_archive (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_login (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_users_latest (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_banners (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_articles_category (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_tags_similar (3.1.0) 1 | mod_feed (3.0.0) 1 |
3rd Party:: Slideshow CK (2.5.0) 1 |

Modules :: Admin ::
Core :: mod_messages (4.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_loginsupport (4.0.0) 1 | mod_user (4.0.0) 1 | mod_privacy_status (4.0.0) 1 | mod_login (3.0.0) 1 | mod_title (3.0.0) 1 | mod_version (3.0.0) 1 | mod_privacy_dashboard (3.9.0) 1 | mod_post_installation_messages (4.0.0) 1 | mod_menu (3.0.0) 1 | mod_submenu (3.0.0) 1 | mod_latestactions (3.9.0) 1 | mod_popular (3.0.0) 1 | mod_stats_admin (3.0.0) 1 | mod_frontend (4.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_guidedtours (4.3.0) 1 | mod_custom (3.0.0) 1 | mod_sampledata (3.8.0) 1 | mod_latest (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_feed (3.0.0) 1 |
3rd Party:: Import Content (1.0) 1 |

Libraries ::
Core ::
3rd Party::

Plugins ::
Core :: plg_extension_joomla (3.0.0) 1 | plg_extension_namespacemap (4.0.0) 1 | plg_extension_finder (4.0.0) 1 | plg_media-action_resize (4.0.0) 1 | plg_media-action_crop (4.0.0) 1 | plg_media-action_rotate (4.0.0) 1 | plg_api-authentication_basic (4.0.0) 0 | plg_api-authentication_token (4.0.0) 1 | plg_workflow_featuring (4.0.0) 1 | plg_workflow_publishing (4.0.0) 1 | plg_workflow_notification (4.0.0) 1 | plg_sampledata_multilang (4.0.0) 1 | plg_webservices_newsfeeds (4.0.0) 1 | plg_webservices_tags (4.0.0) 1 | plg_webservices_privacy (4.0.0) 1 | plg_webservices_installer (4.0.0) 1 | plg_webservices_templates (4.0.0) 1 | plg_webservices_media (4.1.0) 1 | plg_webservices_plugins (4.0.0) 1 | plg_webservices_content (4.0.0) 1 | plg_webservices_menus (4.0.0) 1 | plg_webservices_users (4.0.0) 1 | plg_webservices_config (4.0.0) 1 | plg_webservices_modules (4.0.0) 1 | plg_webservices_messages (4.0.0) 1 | plg_webservices_redirect (4.0.0) 1 | plg_webservices_banners (4.0.0) 1 | plg_webservices_languages (4.0.0) 1 | plg_privacy_message (3.9.0) 1 | plg_privacy_actionlogs (3.9.0) 1 | plg_privacy_consents (3.9.0) 1 | plg_privacy_content (3.9.0) 1 | plg_privacy_user (3.9.0) 1 | plg_installer_override (4.0.0) 1 | plg_installer_folderinstaller (3.6.0) 1 | plg_installer_packageinstaller (3.6.0) 1 | plg_installer_urlinstaller (3.6.0) 1 | plg_installer_webinstaller (4.0.0) 1 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_authentication_cookie (3.0.0) 1 | plg_quickicon_privacycheck (3.9.0) 1 | plg_quickicon_overridecheck (4.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 1 | plg_quickicon_downloadkey (4.0.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 1 | plg_quickicon_extensionupdate (3.0.0) 1 | plg_quickicon_eos (4.4.0) 1 | plg_system_stats (3.5.0) 1 | plg_system_debug (3.0.0) 1 | plg_system_sessiongc (3.8.6) 1 | plg_system_httpheaders (4.0.0) 1 | plg_system_cache (3.0.0) 0 | plg_system_remember (3.0.0) 1 | plg_system_logout (3.0.0) 1 | plg_system_languagefilter (3.0.0) 0 | plg_system_actionlogs (3.9.0) 1 | plg_system_sef (3.0.0) 1 | plg_system_jooa11y (4.2.0) 1 | plg_system_skipto (4.0.0) 1 | plg_system_languagecode (3.0.0) 0 | plg_system_highlight (3.0.0) 1 | plg_system_privacyconsent (3.9.0) 0 | plg_system_updatenotification (3.5.0) 1 | plg_system_logrotation (3.9.0) 1 | plg_system_shortcut (4.2.0) 1 | plg_system_fields (3.7.0) 1 | plg_system_log (3.0.0) 1 | plg_system_guidedtours (4.3.0) 1 | plg_system_task_notification (4.1) 1 | plg_system_webauthn (4.0.0) 0 | plg_system_accessibility (4.0.0) 0 | plg_system_redirect (3.0.0) 0 | plg_system_schedulerunner (4.1) 1 | plg_actionlog_joomla (3.9.0) 1 | plg_content_joomla (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_confirmconsent (3.9.0) 0 | plg_content_fields (3.7.0) 1 | plg_content_loadmodule (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_content_finder (3.0.0) 0 | plg_content_emailcloak (3.0.0) 1 | plg_content_vote (3.0.0) 0 | plg_fields_imagelist (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_fields_subform (4.0.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_task_requests (4.1) 1 | plg_task_demo_tasks (4.1) 1 | plg_task_check_files (4.1) 1 | plg_task_site_status (4.1) 1 | plg_behaviour_taggable (4.0.0) 1 | plg_behaviour_versionable (4.0.0) 1 | plg_behaviour_compat (4.4.0) 1 | plg_filesystem_local (4.0.0) 1 | plg_user_terms (3.9.0) 0 | plg_user_joomla (3.0.0) 1 | plg_user_profile (3.0.0) 0 | plg_user_contactcreator (3.0.0) 0 | plg_user_token (3.9.0) 1 | plg_multifactorauth_yubikey (3.2.0) 0 | plg_multifactorauth_email (4.2.0) 0 | plg_multifactorauth_totp (3.2.0) 0 | plg_multifactorauth_webauthn (4.2.0) 0 | plg_multifactorauth_fixed (4.2.0) 0 | plg_captcha_recaptcha_invisible (3.8) 0 | plg_captcha_recaptcha (3.4.0) 1 | plg_finder_newsfeeds (3.0.0) 1 | plg_finder_tags (3.0.0) 1 | plg_finder_categories (3.0.0) 1 | plg_finder_contacts (3.0.0) 1 | plg_finder_content (3.0.0) 1 | plg_editors-xtd_module (3.5.0) 1 | plg_editors-xtd_menu (3.7.0) 1 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_fields (3.7.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_image (3.0.0) 1 |
3rd Party:: plg_extension_jce (2.9.55) 1 | plg_editors_codemirror (5.65.15) 1 | plg_editors_jce (2.9.55) 1 | plg_editors_tinymce (5.10.9) 1 | plg_installer_jce (2.9.55) 1 | plg_quickicon_jce (2.9.55) 1 | PLG_QUICKICON_AKEEBABACKUP (9.8.3) 1 | plg_system_designit (1.0.0) 0 | JUB (1.2.0) 0 | plg_system_jce (2.9.55) 1 | plg_content_jce (2.9.55) 1 | PLG_CONTENT_TTMENUSTYLE (1.0.0) 1 | plg_fields_mediajce (2.9.55) 1 |
Templates Discovered :: wrote:Templates :: Site :: cassiopeia (1.0) 1 |
Templates :: Admin :: atum (1.0) 1 |

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: BUG? Deprecated PHP function mb_strpos()

Post by nacc » Thu Dec 07, 2023 8:04 pm

It's not immediately obvious to me (or, to most people, probably) why you're getting these warning messages (if you have debug enabled) when you're displaying a list of contacts on your website. I can't see any third-party extensions you've installed that may be directly responsible but, then again, I don't know anything about several of the third-party extensions you're using.

I don't think you need the JA Extensions Manager component—two different versions are listed—or even if that extension is installed. It's unlikely, in any event, that this component should influence the frontend of your website. One extension you have, a plugin called JUB, seems unusual to me. I don't know anything about it at all and I can't find any details about how it's used or what it does.

I'm beginning to suspect that the reason you're getting the PHP warning is because of a data anomaly in the _contact_details table. Perhaps one of the records—one or more rows—in that table contains something that isn't right? Perhaps deleting all the records and re-creating them again, one at a time, may overcome the problem. It's a puzzlement.

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Thu Dec 07, 2023 8:26 pm

Thank you for the reply!

While I was reading your reply, a huge light bulb above my head lit up.

In mid November when the site went live, I changed the display options to turn off "Show Contacts Category". (Contacts Category) ...this was supposed to be "All Contacts" category and that's where the "All Contacts" used to be displayed before I turned it off. That's likely triggered the error -- the $haystack variable is supposed to contain the Contacts Category's text. Since I turned the display off, the variable is empty.

That might ...just might...be a minor coding issue. And likely why the FPA didn't flag anything or debug log.

I will go through the contacts and contacts categories and verify it's clean data.

jp

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Thu Dec 07, 2023 8:27 pm

I will look into the options later and take a screenshot of the offending setting once I find it.

nice2odie
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Apr 07, 2011 3:57 am

Re: BUG? Deprecated PHP function mb_strpos()

Post by nice2odie » Sun Dec 10, 2023 7:55 pm

A follow up to this posst. It's not really a J! bug but a PHP 8.x issue.

Attached is a screenshot of the Contacts page with the "Show Category" enabled. The error messages appear before the category text (and with error reporting level set to Max)
screenshot.pdf
This topic can be closed.

jp
You do not have the required permissions to view the files attached to this post.

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

Re: BUG? Deprecated PHP function mb_strpos()

Post by toivo » Mon Dec 11, 2023 8:06 am

nice2odie wrote:
Sun Dec 10, 2023 7:55 pm
It's not really a J! bug but a PHP 8.x issue.
I'd rather categorise it as a combination of a data issue and possibly also an oversight in the coding of the Contacts component but only in a particular use case.

Deprecated messages will pop up in PHP 8.2, as long as 'Error Reporting' allows Deprecated messages and the input data of PHP native functions like mb_strpos() is not what the PHP engine expects. They are a feature introduced progressively in PHP and this one in PHP 8.2. It is not an issue in this case, as long as the contacts data is consistent.

The second tab of the menu item for 'All Contacts' is 'Category'. Check the option 'Empty Categories. The default option is 'Use Global (Hide)' and there is also the option 'Hide', which makes sense. If 'Show' is selected and the contact category has no contacts, a visitor to a Joomla 4.4.1 website will see the message "There are no Contacts to display".
Toivo Talikka, Global Moderator


Post Reply

Return to “General Questions/New to Joomla! 4.x”