Image selection in category configuration does not work properly

Phoca Download - download manager
User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Image selection in category configuration does not work properly

Post by madmetz »

Hi,

If you want to assign or change an image to your category, there is a problem when you try to change the folder.
Go to components -> phoca download -> categories -> <select a category> -> general options -> image
Click on 'Select image'. The path you can see is: 'http-root/images/phocadownload'. Everything is right until here.
Now click on the 'level up arrow'.
Next you will see that the path has changed to: 'http-root/phocadownload'. This is not correct.
The expected path should be: 'http-root/images'. :?
In addition to that you'll get Joomla errors if you create subfolders of 'http-root/images/phocadownload/icons',
lets say: 'http-root/images/phocadownload/icons/my/cars'.
If you click 'Up' this results in: 'http-root/phocadownload/icons/my' which is not a valid path.

Joomla comes up with the following error messages:
Warning
JFolder: :files: Path is not a folder. Path: ...\phocadownload\icons\my
JFolder: :folder: Path is not a folder. Path: ...\phocadownload\icons\my

Other info:
'http-root/images' is the Joomla images default path.
'http-root/phocadownload' is the Phoca Download default path.

As a workaround I tried to set the Phoca Download (relative) path to: 'images/phocadownload' instead of 'phocadownload'
but this results in other problems.

Regards Mike

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image selection in category configuration does not work properly

Post by Jan »

Hi, thank you very much for the info, this will be fixed in next version.

Now you can do a quick fix, open this file:

administrator\components\com_phocadownload\views\phocadownloadmanager\tmpl\default_up.php

and edit line cca 15:

FROM:

Code: Select all

$link = 'index.php?option='.$this->t['o'].'&amp;view='. PhocaDownloadUtils::filterValue($this->t['task'], 'alphanumeric').'&amp;manager='.PhocaDownloadUtils::filterValue($this->manager . $group['c'], 'alphanumeric') .'&amp;folder='.PhocaDownloadUtils::filterValue($this->folderstate->parent, 'folderpath') .'&amp;field='. PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2');
TO:

Code: Select all

$link = 'index.php?option='.$this->t['o'].'&amp;view='. PhocaDownloadUtils::filterValue($this->t['task'], 'alphanumeric').'&amp;manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric'). $group['c'] .'&amp;folder='.PhocaDownloadUtils::filterValue($this->folderstate->parent, 'folderpath') .'&amp;field='. PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2');
Please let me know if this works for you.

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
madmetz
Phoca Member
Phoca Member
Posts: 34
Joined: 08 Apr 2019, 16:20

Re: Image selection in category configuration does not work properly

Post by madmetz »

Hi Jan,

thanks a lot for your help.
It seems to be ok now. I can go forth and back in the file structure without any problems. I would say: "Solved" :D

Regards Mike
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image selection in category configuration does not work properly

Post by Jan »

Hi, thank you for this info. Will be set in next version.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image selection in category configuration does not work properly

Post by Jan »

If you find Phoca extensions useful, please support the project
Post Reply