jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Bugs! => Topic started by: Rajada on 05.04.2023 20:02:36

Title: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Rajada on 05.04.2023 20:02:36
Just tried to update to 4.0.22 stable and got this error message on the backend. Thought you'd like to know.



0: Undefined constant DS

Call stack
# Function Location
1 () JROOT/administrator/components/com_jdownloads/helpers/jdownloads.php:24
2 require_once() JROOT/administrator/components/com_installer/src/Model/UpdateModel.php:567
3 Joomla\Component\Installer\Administrator\Model\UpdateModel->preparePreUpdate() JROOT/administrator/components/com_installer/src/Model/UpdateModel.php:351
4 Joomla\Component\Installer\Administrator\Model\UpdateModel->update() JROOT/administrator/components/com_installer/src/Controller/UpdateController.php:58
5 Joomla\Component\Installer\Administrator\Controller\UpdateController->update()         JROOT/libraries/src/MVC/Controller/BaseController.php:672
6 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
7 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
12 require_once() JROOT/administrator/index.php:32
Title: Re: Undefined constant DS when updating to 4.0.22 stable
Post by: Arno on 06.04.2023 10:36:12
Hi,
QuoteJROOT/administrator/components/com_jdownloads/helpers/jdownloads.php:24
This is a file from jDownloads 3.9.x. So it is a bug in this older release.
But I wonder why this error has never been reported until now. The error should actually appear with almost every call of the old version in the backend.

Could you please deactivate the debug function and reset the setting for 'Error Reporting' to 'System Default' and then try again? 
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Rajada on 06.04.2023 11:00:50
I still get the error, just less details.
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Arno on 06.04.2023 11:19:52
What exactly is your old jDownloads version and also your Joomla release. PHP?
Have you never seen this message with the old version? Or did you update from 3.2 to 3.9 just before?
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Arno on 06.04.2023 11:35:29
Try the attached 3.9.8.8 version. Install this before you start the jDownloads 4 update.

But I am not sure what exactly is going on with them at the moment. The information is very scarce.
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Rajada on 07.04.2023 05:30:46
I already have 4.0.21. You helped me earlier with issues on my joomla 4 site with the database update script not working. I don't think installing a 3.0 version would be a good idea.
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Arno on 07.04.2023 10:51:17
Quote from: Rajada on 07.04.2023 05:30:46
I already have 4.0.21. You helped me earlier with issues on my joomla 4 site with the database update script not working. I don't think installing a 3.0 version would be a good idea.

It seems that I just don't understand what exactly your current situation is.  ::) :-\

If you have already installed version 4.0.21, I don't understand the error message you posted. Because the file listed there does not exist in this version (only in version 3.9.x).

Could I get access to your backend? If so, please send the data via PM.
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Jefferson49 on 07.04.2023 11:25:56
I got exactly the same error after upgrading from 4.0.22 to 4.0.23

- Joomla: 4.2.9
- jD 4.0.22
- PHP: 8.0.23
- Standard backend template: jD yes, Joomla Atum
- Options file attached

Undefined constant "DS"

1 () JROOT/administrator/components/com_jdownloads/helpers/jdownloads.php:24
2 require_once() JROOT/administrator/components/com_installer/src/Model/UpdateModel.php:567
3 Joomla\Component\Installer\Administrator\Model\UpdateModel->preparePreUpdate() JROOT/administrator/components/com_installer/src/Model/UpdateModel.php:351
4 Joomla\Component\Installer\Administrator\Model\UpdateModel->update() JROOT/administrator/components/com_installer/src/Controller/UpdateController.php:58
5 Joomla\Component\Installer\Administrator\Controller\UpdateController->update() JROOT/libraries/src/MVC/Controller/BaseController.php:672
6 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
7 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
12 require_once() JROOT/administrator/index.php:32
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Arno on 07.04.2023 18:48:32
Anscheinend können wir auch in Deutsch kommunizieren, das macht es etwas einfacher:
- wie schon zuvor geschrieben, sollte in dem aufgeführten Verzeichnis (nach dem Update) keine solche Datei existieren /helpers/jdownloads.php
- bitte benenne diese Datei daher einmal um (zum Testen)
- im übrigen sollte diese Administrator Struktur vorhanden sein (siehe pic)
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Jefferson49 on 07.04.2023 19:07:28
Ja, gerne in Deutsch. Danke für den Tipp! Habe die Datei umbenannt (jdownloads.php.old). Danach hat das Update funktioniert!

@Rajada
For me, it worked to rename the file (/administrator/components/com_jdownloads/helpers/jdownloads.php, e.g. to jdownloads.php.old). Maybe, you can also try this.
Title: Re: Undefined constant DS when updating to 4.0.22 stable - [Bug in 3.9.8.6]
Post by: Rajada on 07.04.2023 23:14:14
Okay, I had an old (3.X something) JDownloads install, but had to update to Joomla 4, so I updated to the jdownloads 4 beta, had some issues with the database that you helped me with, and everything was fine until I tried to update to this new version.