CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12671] FilePicker prefix error

avatar
Created By: Chris Taylor (chrisbt)
Date Submitted: Tue Dec 05 17:02:37 -0500 2023

Assigned To: Chris Taylor (chrisbt)
Version: 2.2.18
CMSMS Version: 2.2.18
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
FilePicker prefix error
Detailed Description:
if you have a FilePicker profile set with an empty (optional) Top Directory, a
prefix of '/' is set the second time the FilePicker is used.
If you don't have any FilePicker profiles set the prefix is always empty '' and
works correctly.

To reproduce the error:
- create a 'Default' FilePicker profile with an empty 'Top Directory'
- use the MicroTiny WYSIWYG, click, 'insert/edit image', select an image, then
select another image.
- a double prefix '//' shows after uploads in the selected url
- remove the 'Default' FilePicker profile and it stops happening

Note:
/modules/FilePicker/lib/js/cmsms_filebrowser/filebrowser.js, line 26
		if( settings.prefix ) file = settings.prefix + file;

I'll investigate further where settings.prefix is set an what else it is used
by...


History

Comments
avatar
Date: 2023-12-06 13:08
Posted By: Chris Taylor (chrisbt)

fixed in svn
      
avatar
Date: 2024-05-06 10:46
Posted By: Fernando Morgado (JoMorg)

CMSMS 2.2.20 has been released, thx!
      
Updates

Updated: 2024-05-06 10:46
resolution_id: => 7
state: Open => Closed