By Anthony Pollock on Tuesday, 06 September 2022
Posted in Technical Issues
Replies 7
Likes 0
Views 434
Votes 0
Hello,
We are testing the migration from Joomla 3.10.11 to 4.2.2 on a test server. We are running EasyBlog 6.0.6. After running the Joomla 4.2.2 update, I tested the Smart Search indexer. It keeps crashing with the error, "undefined
mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)." In reviewing what was indexed before the crash, it was indexing EasyBlog posts. I unpublished the "Smart Search - EasyBlog Posts" plugin and the Joomla Smart Search indexer runs without issue. Publishing the EasyBlog plugin creates the error again. Is there something I need to do to get the EasyBlog Smart Search plugin to successfully index EasyBlog posts?
Thanks,
Anthony Pollock
Hi Anthony,

I tried this in my local instance but I could not reproduce the issue. Would it be possible to provide us access to the test server so I can directly troubleshoot the error there?
·
Wednesday, 07 September 2022 10:35
·
0 Likes
·
0 Votes
·
0 Comments
·
I wish I could give you access, but it is a temporary VM behind a firewall.

Are you using PHP 8.x? The error I am getting is pretty common with PHP 8. This version no longer allows NULL or empty parameters in many functions.
·
Wednesday, 07 September 2022 20:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is a snippet of the Indexer log at the point of crash:

2022-09-06T14:30:24+00:00 INFO 10.4.43.91 - Starting the indexer batch process
2022-09-06T14:30:24+00:00 WARNING 10.4.43.91 deprecated Joomla\CMS\Application\CMSApplication::getCfg() is deprecated and will be removed in 5.0. Use JFactory->getApplication()->get() instead.
2022-09-06T14:30:24+00:00 WARNING 10.4.43.91 deprecated Joomla\CMS\Application\CMSApplication::getCfg() is deprecated and will be removed in 5.0. Use JFactory->getApplication()->get() instead.
2022-09-06T14:30:24+00:00 WARNING 10.4.43.91 deprecated Joomla\CMS\Application\CMSApplication::getCfg() is deprecated and will be removed in 5.0. Use JFactory->getApplication()->get() instead.
2022-09-06T14:30:25+00:00 CRITICAL 10.4.43.91 error Uncaught Throwable of type ValueError thrown with message "mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)". Stack trace: #0 [ROOT]/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php(43): mb_strpos()
#1 [ROOT]/libraries/vendor/joomla/string/src/StringHelper.php(162): utf8_strpos()
#2 [ROOT]/administrator/components/com_easyblog/includes/truncater/truncater.php(563): Joomla\String\StringHelper::strpos()
#3 [ROOT]/administrator/components/com_easyblog/includes/truncater/truncater.php(538): EasyBlogTruncater->truncateByTag()
#4 [ROOT]/administrator/components/com_easyblog/includes/truncater/truncater.php(129): EasyBlogTruncater->truncateByParagraph()
#5 [ROOT]/administrator/components/com_easyblog/includes/post/post.php(5245): EasyBlogTruncater->truncate()
#6 [ROOT]/plugins/finder/easyblog/easyblog.php(207): EasyBlogPost->getIntro()
#7 [ROOT]/administrator/components/com_easyblog/includes/compatibility.php(535): plgFinderEasyBlog->proxyIndex()
#8 [ROOT]/administrator/components/com_finder/src/Indexer/Adapter.php(244): EBFinderBase->index()
#9 [ROOT]/libraries/src/Plugin/CMSPlugin.php(279): Joomla\Component\Finder\Administrator\Indexer\Adapter->onBuildIndex()
#10 [ROOT]/libraries/vendor/joomla/event/src/Dispatcher.php(486): Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()
#11 [ROOT]/libraries/src/Application/EventAware.php(107): Joomla\Event\Dispatcher->dispatch()
#12 [ROOT]/administrator/components/com_finder/src/Controller/IndexerController.php(172): Joomla\CMS\Application\WebApplication->triggerEvent()
#13 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): Joomla\Component\Finder\Administrator\Controller\IndexerController->batch()
#14 [ROOT]/libraries/src/Dispatcher/ComponentDispatcher.php(143): Joomla\CMS\MVC\Controller\BaseController->execute()
#15 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
#16 [ROOT]/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent()
#17 [ROOT]/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#18 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute()
#19 [ROOT]/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#20 [ROOT]/administrator/index.php(32): require_once('[ROOT]/...')
#21 {main}
·
Wednesday, 07 September 2022 20:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Anthony,

Thanks for the error stack trace. I'm on php8.1 but could not reproduce the issue.

Looking at the error stack, it appears that at least one of your post has empty content(maybe an image but no text) and this is causing the error during indexing. Not sure how you created that post as I could not publish new posts without text content.

Nevertheless, I will log this in our tracker so we can address it.
·
Thursday, 08 September 2022 11:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you! I will look for that post and see if I can remove it. I'm not sure why we have an empty post, but maybe our blogger started one and never finished it.
·
Thursday, 08 September 2022 20:51
·
0 Likes
·
0 Votes
·
0 Comments
·
When I look at the __easyblog_post table using "SELECT * FROM __easyblog_post WHERE content='', I get seven rows that show posts from our initial testing of EasyBlog in May 2020. The "published" column for all of them contains '3'. I cannot find these posts anywhere in EasyBlog. I checked Trashed and Unpublished, but could not find any of them. Is there possibly some corruption in the EB tables?
·
Thursday, 08 September 2022 22:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Anthony,
Is there possibly some corruption in the EB tables?
I would have to check the site and it's data to know exactly for sure. Basically the published state = 3 are drafts.
I will look for that post and see if I can remove it. I'm not sure why we have an empty post, but maybe our blogger started one and never finished it.
Do note that the empty post is just speculation by me. Without access to troubleshoot the site, I couldn't provide any solid info.
·
Friday, 09 September 2022 12:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post