Skip to content
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

Undefined constant CONTENT_DIR in pico_admin.php #3

Open
AeonFr opened this issue Nov 25, 2015 · 5 comments
Open

Undefined constant CONTENT_DIR in pico_admin.php #3

AeonFr opened this issue Nov 25, 2015 · 5 comments

Comments

@AeonFr
Copy link

AeonFr commented Nov 25, 2015

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
Copy link

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
Copy link

(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
Copy link

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

@ghost
Copy link

ghost commented Jul 4, 2016

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
Copy link

I'm getting the same thing.

  • Pico CMS 1.0.5
  • Pico Admin 2.0.1

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/");

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

No branches or pull requests

4 participants