• Fabrik4.5.1 for Joomla5.2.4

    Fabrik4.5.1 is out. This update is needed for J!5.2.4

    See Announcements

Fixed J5.2.2. F4.5 fileupload element

wezetel

Active Member
With F4.5 and download script enabled (rest of the settings are standard) it is not possible to download a file.
Error: 0 preg_match(): Argument #2 ($subject) must be of type string, array given

Call Stack​



# Function Location
1 () JROOT/plugins/fabrik_element/fileupload/adaptors/filesystemstorage.php:539
2 preg_match() JROOT/plugins/fabrik_element/fileupload/adaptors/filesystemstorage.php:539
3 Filesystemstorage->getFullPath() JROOT/plugins/fabrik_element/fileupload/fileupload.php:3714
4 PlgFabrik_ElementFileupload->onAjax_download() JROOT/libraries/src/Plugin/CMSPlugin.php:289
5 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454
6 Joomla\Event\Dispatcher->dispatch() JROOT/components/com_fabrik/controllers/plugin.php:82
7 FabrikControllerPlugin->pluginAjax() JROOT/libraries/src/MVC/Controller/BaseController.php:730
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_fabrik/fabrik.php:200
9 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
11 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:218
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:261
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:58
16 require_once() JROOT/index.php:32
 
I have J.5.2.2 and F4.5.0 on the test server and I don't have this issue with the fileupload.

Below my settings:

1734460422514.png


Rest are by default.
 
Ajax upload or standard?
If Ajax: max=1 or default?

You can try to redo (I can't remember why I added it:oops:)
1734470836387.png
 
Last edited:
It's standard upload.
If reverting your change, seems to work again (at least with a quick test).
Will do some more testing today....
 
Tested it now on a site, where the fileupload element is part of a repeating group. And this is now working also as expected.
Just wondering, why @dimoss doesn't have this problem :)

Will this fix be part of further releases?
 
Tested it now on a site, where the fileupload element is part of a repeating group. And this is now working also as expected.
Just wondering, why @dimoss doesn't have this problem :)

Will this fix be part of further releases?
I have standard upload method too. I can share the rest of the settings if you need them.
The fileupload element is not part of a repeating group.
It works fine also in J4.4.9 with F4.4.1.
 
@wezetel I confirm that the initial code was an issue. I was confused because I checked only in list and not inside the form to download. In the latter case didn't work as you mentioned. I reverted as @troester mentioned and worked. I tested on both J5.2.2 and J.4.4.9. Same behaviour.

@troester Is it going to be included in the next release?

Thanks and Happy New Year!
 
Back
Top