Skip to content

Conversation

@exhnozoaa
Copy link

In this fork/branch, do_open(), do_save(), and do_delete() now support subdirectories and index.md files. Instead of using basename() on the URL, it is now using parse_url().

Currently, Pico does not support files with the same names as directories. In this fork/branch, the plugin uses the correct file/directory based on a trailing slash being used for directories and no trailing slash being used for files. However, this will not fix that the directory will override the file on the Pico front end (a different bug for a different project).

do_open(), do_save(), and do_delete() now support subdirectories and index.md files. Instead of using basename() on the URL, we are now using parse_url().

Currently, Pico does not support files with the same names as directories. This plugin will use the correct version based on a trailing slash being used for directories and no trailing slash being used for files. However, this will not fix that the directory will override the file on the Pico front end.
@exhnozoaa
Copy link
Author

This is meant to address issue #2, but I can't seem to figure out how to link them in GitHub. I apologize for the duplicate issue.

@csholmq
Copy link

csholmq commented Aug 13, 2013

This didn't fix my issues. If anything now I can't edit anything.

@exhnozoaa
Copy link
Author

Thanks for the feedback. Hmm... I'm not sure what the problem could be. Where there any error messages, or did it just not work?

@csholmq
Copy link

csholmq commented Aug 14, 2013

I have no idea. I turned on all PHP errors but nothing showed up. All I get is Error: Invalid file. I can successfully create and edit a file. But as soon as I click on another file the error message pops up. So something is up with opening them.

@csholmq
Copy link

csholmq commented Aug 14, 2013

I did some probing and it's line 122 that goes off. I.e the second die(error) in do_open. I think it's due to my site being in a subdirectory.

print_r($parse_file_url)
Array
(
[scheme] => http
[host] => honken.eu
[path] => /pages/blog/pwd_req
)

echo CONTENT_DIR . $parse_file_url['path']
/share/MD0_DATA/Web/pages/content//pages/blog/pwd_req

As you can see /pages is my subdirectory and is in both path and the physical file path.

@pomaxa
Copy link

pomaxa commented Aug 27, 2013

It will be nice, to be able to create subdirictory and a new page in subdirictory; btw, - thanks

@pomaxa
Copy link

pomaxa commented Aug 28, 2013

@exhnozoaa I've taken your changes and create a new pull request with some more improvements (#5)

@pomaxa
Copy link

pomaxa commented Mar 12, 2014

@varakh - I haven't use pico for a while, - so can't tell you right now, but if you can describe the error in my version, I'll be able to update it.

@pomaxa
Copy link

pomaxa commented Mar 12, 2014

@varakh have you update base_url ?

@pomaxa
Copy link

pomaxa commented Mar 12, 2014

all scripts use this var when load resources like

<script src="{{ base_url }}/{{ plugin_path }}/epiceditor/js/epiceditor.min.js"></script>

so if you change your base_url, by moving your project from root dir, please be sure to update this var.

@pomaxa
Copy link

pomaxa commented Mar 12, 2014

@varakh - have you check error log ? can you show an example?

@ghost
Copy link

ghost commented Mar 12, 2014

@pomaxa I just moved it to / and won't try it in /blog/ again. Guess I won't be able to figure out a solution to this problem. But nevermind. It's okay like this. Thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants