JDownloads: 4.0.26 Stable
Joomla: 4.3.0
PHP: 8.0.27
Web Server: Apache
Database: mysql 5.7.35-38-log
After upgrading my site to Joomla 4.3.0 I got these errors when I tried to upload some files with JDownloads:
ClassNotFoundError
HTTP 500 Whoops, looks like something went wrong.
Attempted to load class "Fields" from namespace "Joomla\Plugin\Content\Fields\Extension".
Did you forget a "use" statement for another namespace?
Exception
Symfony\Component\ErrorHandler\Error\
ClassNotFoundError
in /plugins/content/fields/services/provider.php (line 36)
in /libraries/vendor/joomla/di/src/ContainerResource.php -> {closure} (line 182)
in /libraries/vendor/joomla/di/src/Container.php -> getInstance (line 96)
Container->get()
in /libraries/src/Extension/ExtensionManagerTrait.php (line 177)
CMSApplication->loadExtension()
in /libraries/src/Extension/ExtensionManagerTrait.php (line 99)
CMSApplication->bootPlugin()
in /libraries/src/Plugin/PluginHelper.php (line 221)
PluginHelper::import()
in /libraries/src/Plugin/PluginHelper.php (line 181)
PluginHelper::importPlugin()
in /administrator/components/com_jdownloads/src/Model/DownloadModel.php (line 346)
DownloadModel->save()
in /administrator/components/com_jdownloads/src/Model/DownloadModel.php (line 1223)
DownloadModel->createAutoDownload()
in /administrator/components/com_jdownloads/helpers/scan.php (line 1033)
checkFiles()
in /wadministrator/components/com_jdownloads/helpers/scan.php (line 184)
Stack Trace
ClassNotFoundError
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "Fields" from namespace "Joomla\Plugin\Content\Fields\Extension".
Did you forget a "use" statement for another namespace?
at /plugins/content/fields/services/provider.php:36
at Joomla\DI\ServiceProviderInterface@anonymous/plugins/content/fields/services/provider.php:20$6->{closure}()
(/libraries/vendor/joomla/di/src/ContainerResource.php:182)
at Joomla\DI\ContainerResource->getInstance()
(/libraries/vendor/joomla/di/src/Container.php:96)
at Joomla\DI\Container->get()
(/libraries/src/Extension/ExtensionManagerTrait.php:177)
at Joomla\CMS\Application\CMSApplication->loadExtension()
(/libraries/src/Extension/ExtensionManagerTrait.php:99)
at Joomla\CMS\Application\CMSApplication->bootPlugin()
(/libraries/src/Plugin/PluginHelper.php:221)
at Joomla\CMS\Plugin\PluginHelper::import()
(/libraries/src/Plugin/PluginHelper.php:181)
at Joomla\CMS\Plugin\PluginHelper::importPlugin()
(/administrator/components/com_jdownloads/src/Model/DownloadModel.php:346)
at JDownloads\Component\JDownloads\Administrator\Model\DownloadModel->save()
(/administrator/components/com_jdownloads/src/Model/DownloadModel.php:1223)
at JDownloads\Component\JDownloads\Administrator\Model\DownloadModel->createAutoDownload()
(/administrator/components/com_jdownloads/helpers/scan.php:1033)
at checkFiles()
(/administrator/components/com_jdownloads/helpers/scan.php:184)
Could you help me?
Good morning. Jose from Spain.
I have the same error.
To try to find the cause, I have done a new installation without data with joomla 4.3.0 and installed jDownloads 4.0.26 stable and I get the same error when I try to add files.
Option: Check Download Area -> Full Scan -> Make the changes permanent
JDownloads: 4.0.26 Stable
Joomla: 4.3.0
PHP: 8.0.28
Web Server: Apache
Database: mysql 8.0.30
ClassNotFoundError
HTTP 500 Whoops, looks like something went wrong.
Attempted to load class "Contact" from namespace "Joomla\Plugin\Content\Contact\Extension".
Did you forget a "use" statement for another namespace?
Stack Trace
ClassNotFoundError
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "Contact" from namespace "Joomla\Plugin\Content\Contact\Extension".
Did you forget a "use" statement for another namespace?
at /srv/vhost/tifell.com/home/html/actual/plugins/content/contact/services/provider.php:38
at Joomla\DI\ServiceProviderInterface@anonymous/srv/vhost/tifell.com/home/html/actual/plugins/content/contact/services/provider.php:22$0->{closure}(object(Container))
(/srv/vhost/tifell.com/home/html/actual/libraries/vendor/joomla/di/src/ContainerResource.php:182)
at Joomla\DI\ContainerResource->getInstance()
(/srv/vhost/tifell.com/home/html/actual/libraries/vendor/joomla/di/src/Container.php:96)
at Joomla\DI\Container->get('Joomla\\CMS\\Extension\\PluginInterface')
... ...
Hi
I have just looked at this with Joomla 4.3.0 and jD 4.0.26. Simply did a Check Download Area with a full scan and got results as shown below that says I have some missing categories.
Next checked the Database - Categories '7th Group' and 'Logo Stuff' were present.
The directory path for both of these folders (categories) is 'Public Downloads/Noddle Website/Noddle Downloads/' but the actual directories '7th Group' and 'Logo Stuff' were missing!!!
Because I keep a copy of the file structure in my test site I could identify the actual file names.
One of them was a file called 'Example Logo Stuff.pdf' - its database entry was still intact.
So this is definitely a deletion of the actual directories and their contents.
Had Error Reporting set to Maximum but no error reports.
Presently investigating further on other test sites
Colin
-----------------------------------------------
Information about Download Area Check
Problem found! Please check the result!
Last internal messages (executed actions):
Wednesday, 26 April 2023 15:01:
Test Run Results
Directory not found: 7th Group
Directory not found: LogoStuff
Download not found: 7th Group/49-beispielseite-cd-dvd-katalog-chronologisch.pdf
Download not found: 7th Group/Introduction_to_using_the_Nodus_Forum.pdf
Download not found: 7th Group/power.jpg
Download not found: 7th Group/Rotary.pdf
Download not found: 7th Group/Three - Mic - Method.pdf
Download not found: 7th Group/Transmission loss system.pdf
Download not found: 7th Group/Tubes1.png
Download not found: LogoStuff/Example Logo Stuff.pdf
Download not found: LogoStuff/Nodus_WebLogo_All blue.png
Hi
Have now tested with Joomla 4.2.9 and jD4.0.26 - all was well when using Check Download Area.
So my conclusion is that there is some incompatiblity with Joomla 4.3.0. A lot of things were changed in 4.3.0.
Have looked and there seem to be several error reports. Some are about login but others are about article categories.
Colin
Hello everyone
I have done two installations of joomla. The first with version 4.2.9 and the second with 4.3.0. On them I have installed JD 4.0.26 st.
With Joomla 4.2.9 it works correctly.
The mentioned error only occurs in JD 4.0.6 with joomla 4.3.0 when in the control panel of JD you select Check Download Area to add a new file or directory.
Hello all,
I have the same problem, in the backend it does not work .
Greetings Norbert
The error continues in Joomla 4.3.1
Problem confirmed ... unfortunately. :(
- I just updated to Joomla 4.3.1 from Joomla 4.2.9 with jD 4.0.26
- Copied a new file per sftp into an existing folder under "_mbr"
- Went to jDownloads Control Panel and clicked on "Search only for new files"
- The new file was found "Neue Datei gefunden"
- Clicked on "Änderungen durchführen"
- Got exactly the "ClassNotFoundError" reported above by Ren.
Any help to fix this issue is highly appreciated.
Thanks
Tom
BTW: While I had logged into the Joomla backend with English selected, the results of my search for new files were displayed in German in a separate browser window.
Dear All,
I may have found at least a workaround. :)
I found the following post in the Joomla 4.x Coding forum:
https://forum.joomla.org/viewtopic.php?f=831&t=997984&p=3677225&hilit=ClassNotFoundError#p3677225Following this post I have added in file:line
<website root directory>/administrator/components/com_jdownloads/helpers/scan.php:68
the following source code:
app->createExtensionNamespaceMap();
Afterwards, I went to the backend of my J4 website and repeated the steps 3 to 5 of my previous post. This time there was no error. In fact, I got:
QuoteÜberprüfung des Download-Verzeichnisses gestartet
Bitte schließen Sie nicht dieses Fenster bis die Überprüfung beendet wurde!
Neue Dateien werden gesucht
Überprüfte Dateien: 271
Ergebnis der letzten Überprüfung des Download Archivs:
1 neue Datei(en) gefunden und als neue(n) Download(s) in der Datenbank gespeichert.
Zuletzt ausgeführte Aktionen:
Thursday, 04 May 2023 20:07:
Download hinzugefügt <path>/<file>
Überprüfungsdauer: 0.52 Sekunden.Hinweis: Zur automatischen und immer wiederkehrenden Ausführung dieses Scripts können Sie auch einen so genannten 'Cron Job' auf Ihrem Server einrichten. Lesen Sie den Artikel Automatic Publication at Scheduled Times (Cron job) in der Documentation für weitere Details.
Afterwards, I could edit the new file entry and refer to it in an article.
Regards
Tom
I think that the line is:
$app->createExtensionNamespaceMap();
In my case this "fix" temporarily solves the problem. Thanks.
Quote from: Tom68 on 04.05.2023 20:29:02
Dear All,
I may have found at least a workaround. :)
I found the following post in the Joomla 4.x Coding forum: https://forum.joomla.org/viewtopic.php?f=831&t=997984&p=3677225&hilit=ClassNotFoundError#p3677225
Following this post I have added in file:line
<website root directory>/administrator/components/com_jdownloads/helpers/scan.php:68
the following source code:
app->createExtensionNamespaceMap();
Afterwards, I went to the backend of my J4 website and repeated the steps 3 to 5 of my previous post. This time there was no error. In fact, I got:
Afterwards, I could edit the new file entry and refer to it in an article.
Regards
Tom
Great, it works!
Thank you very much!!
Hi Tom68,
thanks a lot for your solution. :) ;)
It seems to work. So it will be a part from the next version 4.0.27.
You're welcome. I am happy that I could help to fix this issue. :)
Regards
Tom