gilbitron / Pico-Editor-Plugin

Provides an online Markdown editor and file manager for Pico.
http://pico.dev7studios.com
MIT License
58 stars 30 forks source link

Path says admin/admin #12

Open kerim opened 10 years ago

kerim commented 10 years ago

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.

crempp commented 10 years ago

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.

kerim commented 10 years ago

That worked. Thanks!

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