coexec / pico_admin

Administration Backend for Pico CMS
MIT License
4 stars 1 forks source link

Undefined constant CONTENT_DIR in pico_admin.php #3

Open AeonFr opened 8 years ago

AeonFr commented 8 years ago

This message appears in my website after installing pico_admin...

Notice: Use of undefined constant CONTENT_DIR - assumed 'CONTENT_DIR' in plugins\pico_admin\pico_admin.php on line 53

Trying to enter url /?admin throws Fatal Error


Notice: Use of undefined constant CONTENT_DIR - assumed 'CONTENT_DIR' in C:\xampp\htdocs\FranCano\plugins\pico_admin\pico_admin.php on line 53

Fatal error: Class 'Locale' not found in C:\xampp\htdocs\FranCano\plugins\pico_admin\lib\helper_strings.php on line 50
candlerb commented 8 years ago

I get the same.

I notice in plugins/00-PicoDeprecated.php that CONTENT_DIR was only provided in picocms 0.9; but it is supposed to be automatically re-enabled when necessary.

candlerb commented 8 years ago

(Aside: under Ubuntu, to get rid of some other errors I had to install the php5-intl and php5-gd packages, and I had to make the plugin directory writeable by the webserver as it wants to concatenate some files together)

Related problem: when trying to upload a file via the uploader (right hand column) I got a 404 error:

Not Found

The requested URL /CONTENT_DIR/admin was not found on this server.

And another related problem, this time with ROOT_DIR, if I click on the preview icon in the middle (editor) pane:

[Fri Feb 12 18:33:43.010671 2016] [:error] [pid 30010] [client x.x.x.106:57239] PHP Warning:  require_once(ROOT_DIR/vendor/michelf/php-markdown/Michelf/Markdown.php): failed to open stream: No such file or directory in /var/www/pico/plugins/pico_admin/markitup/sets/markdown/preview.php on line 3, referer: http://x.x.x.64/pico/admin
[Fri Feb 12 18:33:43.010722 2016] [:error] [pid 30010] [client x.x.x.106:57239] PHP Fatal error:  require_once(): Failed opening required 'ROOT_DIR/vendor/michelf/php-markdown/Michelf/Markdown.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/pico/plugins/pico_admin/markitup/sets/markdown/preview.php on line 3, referer: http://x.x.x.64/pico/admin
GuibertLo commented 8 years ago

So there is a solution ? I'm blocked with this plugin....

ghost commented 8 years ago

I'm having the same problem.

Notice: Use of undefined constant CONTENT_DIR - assumed 'CONTENT_DIR' in C:\Wamp\www\pico\plugins\pico_admin\pico_admin.php on line 53

Is there a solution?

neilsimp1 commented 7 years ago

I'm getting the same thing.

I added this line above line 53, and it got rid of the problem at the very least:

define("CONTENT_DIR", $this->plugin_path . "/../../content/");