jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => General => Topic started by: jpp on 28.01.2024 11:49:18

Title: Error in download latest module (prepare statement) - JComments - [Not a bug!]
Post by: jpp on 28.01.2024 11:49:18
Hello I have this error message when using the download latest module:

The number of variables must match the number of parameters in the prepared statement

My configuration is:

Joomla 4.4.2
My sql 8.0
PHP 8.1
Jdownload 4.0.39 Stable

I have this error only on my production site and not on the test one (same version). I don't have all categories and all files in the test system, but I don't think that it's relevant.
Thnk you four your help.
Title: Re: Error in download latest module (prepare statement)
Post by: ColinM on 28.01.2024 12:58:18
Hi
Could you please set in System - Golbal Config - System tab  item Debug System to Yes.  Also set on Sever tab item Error Reporting to Maximum

This will produce a trace of the fault typically 20 lines or so.  Please then include the trace in the body of your reply - NOT an image
Thanks
Colin
Title: Re: Error in download latest module (prepare statement)
Post by: jpp on 28.01.2024 18:58:36
Hello here is tre trace with required parameters

The number of variables must match the number of parameters in the prepared statement

Call stack
#   Function   Location
1   ()   JROOT/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:420
2   mysqli_stmt->bind_param()   JROOT/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:420
3   Joomla\Database\Mysqli\MysqliStatement->execute()   JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:675
4   Joomla\Database\DatabaseDriver->execute()   JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:1323
5   Joomla\Database\DatabaseDriver->loadObject()   JROOT/components/com_jcomments/plugins/com_jdownloads.plugin.php:68
6   jc_com_jdownloads->getObjectInfo()   JROOT/components/com_jcomments/helpers/object.php:91
7   JCommentsObject::_call()   JROOT/components/com_jcomments/helpers/object.php:124
8   JCommentsObject::_loadObjectInfo()   JROOT/components/com_jcomments/helpers/object.php:155
9   JCommentsObject::fetchObjectInfo()   JROOT/libraries/src/Cache/Controller/CallbackController.php:51
10   Joomla\CMS\Cache\Controller\CallbackController->get()   JROOT/components/com_jcomments/helpers/object.php:200
11   JCommentsObject::getObjectInfo()   JROOT/components/com_jcomments/helpers/object.php:61
12   JCommentsObject::getLink()   JROOT/components/com_jcomments/classes/factory.php:132
13   JCommentsFactory::getTemplate()   JROOT/components/com_jcomments/jcomments.php:229
14   JComments::show()   JROOT/components/com_jdownloads/tmpl/download/default.php:1037
15   include()   JROOT/libraries/src/MVC/View/HtmlView.php:415
16   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/libraries/src/MVC/View/HtmlView.php:203
17   Joomla\CMS\MVC\View\HtmlView->display()   JROOT/components/com_jdownloads/src/View/Download/HtmlView.php:296
18   JDownloads\Component\JDownloads\Site\View\Download\HtmlView->display()   JROOT/libraries/src/MVC/Controller/BaseController.php:660
19   Joomla\CMS\MVC\Controller\BaseController->display()   JROOT/components/com_jdownloads/src/Controller/DisplayController.php:123
20   JDownloads\Component\JDownloads\Site\Controller\DisplayController->display()   JROOT/libraries/src/MVC/Controller/BaseController.php:693
21   Joomla\CMS\MVC\Controller\BaseController->execute()   JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
22   Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()   JROOT/components/com_jdownloads/src/Dispatcher/Dispatcher.php:60
23   JDownloads\Component\JDownloads\Site\Dispatcher\Dispatcher->dispatch()   JROOT/libraries/src/Component/ComponentHelper.php:361
24   Joomla\CMS\Component\ComponentHelper::renderComponent()   JROOT/libraries/src/Application/SiteApplication.php:208
25   Joomla\CMS\Application\SiteApplication->dispatch()   JROOT/libraries/src/Application/SiteApplication.php:249
26   Joomla\CMS\Application\SiteApplication->doExecute()   JROOT/libraries/src/Application/CMSApplication.php:293
27   Joomla\CMS\Application\CMSApplication->execute()   JROOT/includes/app.php:61
28   require_once()   JROOT/index.php:32
Title: Re: Error in download latest module (prepare statement)
Post by: ColinM on 06.02.2024 17:38:39
Hi
Which version of jComments are you using?  Is it the one from Estreme?

Colin
Title: Re: Error in download latest module (prepare statement)
Post by: jpp on 12.02.2024 08:38:30
Hello use Jcomments 4.0.27
Best regards
Title: Re: Error in download latest module (prepare statement)
Post by: jpp on 12.02.2024 09:04:04
Hello
as additional information,
If I deactivate Jcomments in Jdownloads, I hve no longer the issue. Nevertheless, in my test systeme Jcomments is activated in Jdownloads and I have no issue. I am going to  check the configurations in every system in order find any difference.

Best regards 
Title: Re: Error in download latest module (prepare statement)
Post by: Arno on 12.02.2024 09:46:48
I will check today the jD plugin file. Sorry for the delay.  :-\
Title: Re: Error in download latest module (prepare statement)
Post by: jpp on 05.03.2024 14:03:27
In addition,
I have performed an upgrade Joomla 4.4.3 and Jdownload 4.0.40
Issue is still the same.
Best regards
Title: Re: Error in download latest module (prepare statement) - [No Bug!]
Post by: Arno on 05.03.2024 15:23:04
When I check your error message above, I realise that you are using an old version of the jDownload plugin. This is already included in the download package of JComments and is NOT compatible with jDownloads 4!

The required new version can be downloaded here and then unpacked and copied into the appropriate directory. See notes in the download description.
Title: Re: Error in download latest module (prepare statement) - JComments - [Not a bug!]
Post by: jpp on 08.03.2024 08:25:13
Thanks for your help. It's now OK. It's surprizing that the old plugin version was running fine on my test system.
Best regards