Can't reproduce 0 ucfirst(): Argument #1 ($string) must be of type string, array given
- Dmitrijs Rekuns
-
Onderwerp Auteur
- Offline
- Berichten: 182
- Ontvangen bedankjes 8
There is an issue. Joomla 6.1.1, please open SEF plugin and enable strict routing. As the result, download links are no longer working (download button in the module) and I get the following error:0 ucfirst(): Argument #1 ($string) must be of type string, array given
Let me explain the architecture.
There was an old module for RDSubs which was adapted to ochSubs. the module displays a list of available files to download and we insert the module into article and made menu item.
All works fine.
But when I enable Strict routing mode in SEF plugin, we get the error mentioned above.
ochSubscriptions 5.4.1, Joomla 6.1.1, php 8.4.
Thank you.
Graag Inloggen deelnemen aan het gesprek.
- Ruud van Lent
-
- Offline
- Berichten: 1863
- Ontvangen bedankjes 123
unfortunately I cannot reproduce. Note: I do not support rd-subs or modules that I didn't develop or that are altered.
I have tested the following to confirm that it is working correct:
- I have an article with its own menu entry
- on that article I used the ochSubscriptions Tools content plugin to add the files in a category: these then render as tiles with a download button for each file
- I have configured the system - SEF plugin as you have done on your site
- when clicking the downloadbutton in that article, the file downloads: no issue
Graag Inloggen deelnemen aan het gesprek.
- Dmitrijs Rekuns
-
Onderwerp Auteur
- Offline
- Berichten: 182
- Ontvangen bedankjes 8
In strict routing mode there are such headers to process the download:
Request URL lala.com/index.php?option=com_ochsubscri...=download.file&id=21
Request Method GET
Status Code 301 Moved Permanently
Request URL lala.com/?option=com_ochsubscriptions&task=download.file&id=21
Request Method GET
Status Code 301 Moved Permanently
Request URL
lala.com/component/ochsubscriptions/download.file/21
Request Method GET
Status Code 500 Internal Server Error
Error 500 comes from JROOT/components/com_ochsubscriptions/src/Service/Router.php:293
When strict routing is disabled the headers are the same except the last redirect to lala.com/component/ochsubscriptions/download.file/21:
Request URL lala.com/index.php?option=com_ochsubscri...=download.file&id=21
Request Method GET
Status Code 301 Moved Permanently
Request URL lala.com/?option=com_ochsubscriptions&task=download.file&id=21
Request Method GET
Status Code 200 OK
Graag Inloggen deelnemen aan het gesprek.
- Dmitrijs Rekuns
-
Onderwerp Auteur
- Offline
- Berichten: 182
- Ontvangen bedankjes 8
Graag Inloggen deelnemen aan het gesprek.
- Ruud van Lent
-
- Offline
- Berichten: 1863
- Ontvangen bedankjes 123
The path for download is "index.php?option=com_ochsubscriptions&task=download.file&id=21".
Graag Inloggen deelnemen aan het gesprek.