Pico-Editor-Plugin icon indicating copy to clipboard operation
Pico-Editor-Plugin copied to clipboard

Path says admin/admin

Open kerim opened this issue 11 years ago • 2 comments

For some reason the path to my files now says admin/admin when trying to edit a file, and so it is getting 404 errors on trying to edit.

kerim avatar Mar 30 '14 08:03 kerim

The problem is poor pathing, this is a common and difficult problem when trying to support all possible installation cases.

You'll need to edit line 92 (your line will depend on the which commit you're on) of plugins/pico_editor/editor.html. The exact change will depend on what your installation looks like. I changed this

$.post('admin/open', { file: fileUrl }, function(data){

to this

$.post('open', { file: fileUrl }, function(data){

and it worked.

Now I have the "Error: Invalid file" issue.

crempp avatar May 14 '14 00:05 crempp

That worked. Thanks!

Also has to be fixed for "save" and "delete" commands.

kerim avatar May 14 '14 01:05 kerim