PDFserial: You must specify a non-empty path to clean

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
5 months 3 weeks ago #356436

-- HikaShop version -- : 5.0.0
-- HikaSerial version -- : 4.0.2
-- Joomla version -- : 5.0.0
-- PHP version -- : test: 8.2.8, prod: 8.1.15
-- Browser(s) name and version -- : FireFox: 119.0

Hi There,


After configuring the PDFSerial plugin with a PDF template it throws me a error message:

An error has occurred.

    0 You must specify a non-empty path to clean 

Call Stack
# 	Function 	Location
1 	() 	JROOT/libraries/vendor/joomla/filesystem/src/Path.php:194
2 	Joomla\Filesystem\Path::clean() 	JROOT/plugins/hikaserial/pdfserial/pdfserial.php:680
3 	plgHikaserialPdfserial->getFilePath() 	JROOT/plugins/hikaserial/pdfserial/pdfserial_configuration.php:171
4 	require() 	JROOT/administrator/components/com_hikaserial/views/plugins/view.html.php:336

Last edit: 5 months 2 weeks ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
5 months 2 weeks ago #356452

Hello,

Can you please give us more details regarding the data you're submitting for the PDF serial configuration ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
5 months 2 weeks ago #356464

Hi Jerome,


What i've did, is, i've created a new PDFserial configuration, with no additional settings, so far, so good.




As soon as a fill in the filename of the PDF Template to be used, the error occurs.



This is the content of the tpw_hikaserial_plugins table, column plugin_params, before entering the filename:
O:8:"stdClass":4:{s:12:"attach_email";s:1:"0";s:15:"attach_download";s:1:"0";s:8:"pdf_path";s:0:"";s:12:"default_font";s:5:"arial";}

After entering the filename:
O:8:"stdClass":4:{s:12:"attach_email";s:1:"0";s:15:"attach_download";s:1:"0";s:8:"pdf_path";s:17:"TryOut-Ticket.pdf";s:12:"default_font";s:5:"arial";}


It does not matter if the PDFtemplate is valid or not, no other configuration is made in the PDFSerial plugin.


Thanks,

Kind regards,
Patrick

Last edit: 5 months 2 weeks ago by plieftinkpride.

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
5 months 2 weeks ago #356470

Hi Jerome,

After some searching on the web, i've found this link:
https://github.com/Kunena/Kunena-Forum/issues/9571

It's for a different plugin, but same error, perhaps it's related..?


Thanks again,

Kind regards,
Patrick

Last edit: 5 months 2 weeks ago by plieftinkpride.

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
5 months 2 weeks ago #356482

Hello,

Please re-download HikaSerial 4.0.2 ; I pushed a hotfix regarding the modification behavior of Joomla clean path function.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
5 months 2 weeks ago #356493

Hi Jerome,


Thanks, but that doesn't solve the issue, i receive the following trace stack:

Call Stack
# 	Function 	Location
1 	() 	JROOT/libraries/vendor/joomla/filesystem/src/Path.php:194
2 	Joomla\Filesystem\Path::clean() 	JROOT/libraries/src/Filesystem/File.php:622
3 	Joomla\CMS\Filesystem\File::exists() 	JROOT/plugins/hikaserial/pdfserial/pdfserial.php:692
4 	plgHikaserialPdfserial->getFilePath() 	JROOT/plugins/hikaserial/pdfserial/pdfserial_configuration.php:171
5 	require() 	JROOT/administrator/components/com_hikaserial/views/plugins/view.html.php:336
6 	PluginsViewPlugins->loadPluginTemplate() 	JROOT/administrator/components/com_hikaserial/views/plugins/view.html.php:146
7 	PluginsViewPlugins->form() 	JROOT/administrator/components/com_hikaserial/views/plugins/view.html.php:21
8 	PluginsViewPlugins->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:697
9 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT/administrator/components/com_hikaserial/helpers/helper.php:696
10 	hikaserialController->display() 	JROOT/administrator/components/com_hikaserial/helpers/helper.php:619
11 	hikaserialController->edit() 	JROOT/libraries/src/MVC/Controller/BaseController.php:730
12 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT/administrator/components/com_hikaserial/helpers/helper.php:725
13 	hikaserialController->execute() 	JROOT/administrator/components/com_hikaserial/hikaserial.php:50
14 	require_once() 	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
15 	Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() 	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
16 	Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() 	JROOT/libraries/src/Component/ComponentHelper.php:361
17 	Joomla\CMS\Component\ComponentHelper::renderComponent() 	JROOT/libraries/src/Application/AdministratorApplication.php:150
18 	Joomla\CMS\Application\AdministratorApplication->dispatch() 	JROOT/libraries/src/Application/AdministratorApplication.php:195
19 	Joomla\CMS\Application\AdministratorApplication->doExecute() 	JROOT/libraries/src/Application/CMSApplication.php:306
20 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT/administrator/includes/app.php:58
21 	require_once() 	JROOT/administrator/index.php:32 

When needed, i can create a login to our test environment...


Thanks,

Kind regards,
Patrick

Last edit: 5 months 2 weeks ago by plieftinkpride.

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
5 months 2 weeks ago #356503

Hello,

Okay, the direct call of Joomla Path::clean was secured but the Joomla File::Exists also calls Path::Clean.
Thus I added a check to avoid the call but for my point of view it looks like an issue in the core but it's not the best moment to launch a debate on that.

I pushed a new hotfix for HikaSerial and I'll have to make a deeper analysis on this kind of issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: plieftinkpride

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
5 months 2 weeks ago #356506

Hi Jerome,

Bingo! That worked!



Could this have any downsides for the PDFSerial plugin?


Thanks again!

Kind regards,
Patrick

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
5 months 2 weeks ago #356521

Hello,

Downsides ?!
No, it's just a modification of the Joomla core which leads to unwanted errors (while previous version just return "false" without creating a fatal error).

Now that you can enter a path for the PDF template (and the plugin can test various folder possibility to check if the file can be found), you can upload a PDF in your media folder and use it as starting point for your PDF generation.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.062 seconds
Powered by Kunena Forum