-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid file when opening any file for editing #2
Comments
I am also facing the same problem. I think there should one more option for the file location and file name in New and Edit options. |
Also experiencing this issue. I can edit files created by the editor, but when I try to edit pages created manually, I get "Error: Invalid file". |
can not open already existing pages correctly Error: Invalid file |
Same error |
Ideally look at some of the forks fixing it, there are couple of them floating around. |
It looks like there are multiple causes for this error. I'm looking into fixing them. By the way, does any know if this project is maintained anymore? It doesn't seem like it. It's been 10 months since any activity, there are 8 pull requests waiting and no response to issues from the project owner. I'd be willing to take over, I'd probably have to fork and apply the pull requests manually. |
It would be nice to have a working editor for pico. Edit: I have some specific requests after working with Pico over night. Some are obvious, others are special requests
That's all I can think up at this time, I'm sure others have other requests for this plugin as well. |
Is this fixed? Would be great to have this working. |
If anyone is looking at this thread any more, this fixes this problem. Edit pico_editor.php.
|
Hi Rory, I'm a bit of a PHP noob, where do I edit this in the file? :) Thanks |
Sorry I should have mentioned that. This was the function do_open() On Thu, Apr 2, 2015 at 9:56 AM, Wessel Grift [email protected]
|
Thanks, but still getting Error: file invalid, unfortunately :*(
|
The best thing you can do is debug, or if you don't have that capacity, then add some lines in there like:
And before the final if statement Those messages will show up right in the editor area. Make sure to check them one at a time, because it will stop at the "die" statement, and the first one will keep you from seeing the second one. |
Alright, thanks:) I'll give it a try! |
Me and my collegue made a dirty fix: somehow it did: localhost/pico/content/pico/index.md |
I"m glad that worked for you, but keep in mind that is specific to your On Fri, Apr 3, 2015 at 12:20 PM, Wessel Grift [email protected]
|
Indeed :) I hope someone will come along for a more permanent fix. |
This is my quick fix for this issue, replace your do_open, do_save and do_delete functions in plugins/pico_editor/pico_editor.php with this gist: https://gist.github.com/tranduyhung/09ad558cb0a53b5f6be2 Please try this code on a test site. Although it works for me but it could erase your content or delete your file if it has a bug hidden somewhere. |
It appears the basename() function does not provide the proper filename for the built-in pages that come with the Pico CMS (Welcome, Sub Page Index and Sub Page). This results in Invalid file errors when attempting to edit any of the pages. I am using wamp.
The text was updated successfully, but these errors were encountered: