jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Bugs! => Topic started by: ddjenkins on 27.08.2023 10:29:23

Title: SOLVED-Errors being caused by JDHelper.php
Post by: ddjenkins on 27.08.2023 10:29:23
Hi,

When I try and run my site Smart Search index, I get an error and the search terminates.

When I look in my site php error log I find the following lines (note I replaced my username with XXXX for security reasons in the output below)

[27-Aug-2023 16:10:49 Australia/Sydney] PHP Warning: Undefined array key 1 in /home/XXXXX/public_html/components/com_jdownloads/src/Helper/JDHelper.php on line 2743
[27-Aug-2023 16:10:49 Australia/Sydney] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/XXXXX/public_html/components/com_jdownloads/src/Helper/JDHelper.php on line 2744
[27-Aug-2023 16:10:49 Australia/Sydney] PHP Warning: Undefined array key 1 in /home/XXXXX/public_html/components/com_jdownloads/src/Helper/JDHelper.php on line 2744
[27-Aug-2023 16:10:49 Australia/Sydney] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/XXXXX/public_html/components/com_jdownloads/src/Helper/JDHelper.php on line 2750


Can you please advise why this is.
I'm running Joomla 4.3.4, whth PHP 8.1.21 and JDownloads  4.0.29. I have tried re-installing Jdownlaods, but problem remains, I cannot run smart search and lots of errors in my error log
Title: Re: Errors being caused by JDHelper.php
Post by: ColinM on 27.08.2023 11:56:06
Hi
Did you remove the Joomla 3 Search Items?
Also have you enabled the Search Plugins 'Smart Search - jDownloads' and 'Smart Search - jDownloads Categories'? And also the 'Content - Smart Search' plugin.

Please see for details
https://www.jdownloads.net/documentation/general-items-v3-9/using-smart-search

Colin
Title: Re: Errors being caused by JDHelper.php
Post by: ddjenkins on 28.08.2023 08:10:28
Hi Colin,

Yes I have enabled the three plugin's mentioned and and uninstalled all search extensions. I have two still on my system from Event Gallery, but their disabled. I'm unable to un install them (I get an error saying "extension is part of a package which does not allow individual extensions to be uninstalled.")

They are disabled, so I don't think their the cause, and it's JDHelper.php that's getting causing warnings in the event log.
Looking at my error log no only PHP warnings there are about this item.

I'm not 100% sure if it's jdownload causing this error, but it's the only error I can find in the logs.

If I run smart search & clock index, I get Call to undefined method Joomla\Component\Finder\Administrator\Indexer\Helper::getContentPath()

That's the only error I get. When I search my PHP error_logs I have over 2000+ warnings. I extracted all the PHP warnings and the only item mentioned was JDHelper.php

So, I am assuming JDHelper is the cause of my smart search not running. I don't know where else to look from an error log perspective.

Title: Re: Errors being caused by JDHelper.php
Post by: ColinM on 28.08.2023 15:08:51
Hi
Will send you a Private Message which is secure.
Colin
Title: Re: Errors being caused by JDHelper.php
Post by: Arno on 30.08.2023 12:08:04
Hi,
I will look at this this afternoon.
Title: Re: Errors being caused by JDHelper.php
Post by: Arno on 30.08.2023 18:27:43
Please copy the unzipped file from the attached archive to this frontend folder: components/com_jdownloads/scr/Helper/
Try it then again and check afterwards the server php error log. Post here your result. Thanks.
This fixed only the error messages and this has nothing to do with the index issue.

I have tested the index creation (and also his update after editing, change, delete) a lot times. I could not see issues for me. Maybe should you delete the index and generate a new one?

QuoteIf I run smart search & clock index, I get Call to undefined method Joomla\Component\Finder\Administrator\Indexer\Helper::getContentPath()
Have you it tried with activated Joomla debug option? This could be helpful.
Title: Re: SOLVED-Errors being caused by JDHelper.php
Post by: ColinM on 30.08.2023 23:56:52
the problem turned out to be some outdated software from earlier version of Joomla had not been removed.
It was incompatible with Smart Search.

Colin