close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Choose Image - Slashes are incorrect in path

Thread began 6/22/2011 4:28 pm by codamedia | Last modified 11/25/2011 4:49 pm by codamedia | 3682 views | 21 replies


Well I figured out a few things. I was seeing a missing slash between the userfiles directory and the first sub-directory. The source file has a user files path of ../../files, and I still have a problem that the site definition for the site would not let me browse for a directory, so I entered it in the same fashion as the files listing, /assets (notice I had to insert a leading forward slash or end up with /assets/assets). The correct listing should be /assets/. That causes the slash to be included between assets and events in my example above. See Troubleshooting

The problem with the wrong slashes occurs when there is more than one sub-directory of depth below the user files. It is appending the directory path to the user files directory, adding a / and then the file name. Therefore, one sub-directory is fine (/assets/events/file.jpg), but two or more sub-directories deep is not (/assets/events\event\sponsors/file.jpg.

Editing the file /webassist/kfm/plugins/return_url/plugin.js can patch the issue. I don't think it is the best fix because KFM is still reporting the bad slashes in the file properties, so it doesn't get to the root of the issue, but it does resolve the issue for CKEditor.

Lines 3 & 4 need to add url=url.replace(/\\/g,'/'); so it reads like this:

x_kfm_getFileUrls(selectedFiles,function(urls){var caption='',url='';if(files.length==1&&File_getInstance(files[0]).width){url=urls[0].replace(/([^:]\/)\//g,'$1');url=url.replace(/^\/\//,'');url=url.replace(/\\/g,'/');caption=File_getInstance(files[0]).caption;}
else{if(files.length==1)url=urls[0].replace(/\\/g,'/');else url='"'+urls.join('","')+'"';}

That fixes the urls being fed to CKEditor. It might be necessary to add a similar replace for the last else condition, but I could not figure out what that statement is for. This works for images and links.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...