picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.82k stars 616 forks source link

Class 'AbstractPicoPlugin' not found #283

Closed AeonFr closed 8 years ago

AeonFr commented 8 years ago

I just recieved this error message and apparently my picco installation is now not working with any plug in. I'm running pico inside '/vendor/picocms/pico/' on localhost just to test if it could be possible to implement it as a basic catalogue site cms. I installed two plug ins, Pico Tags and Pico Editor by copying their files inside the pico/plugin folders. Nothing went wrong when installing Pico Tags since I only needed to copy a single file, yet in order to install PicoEditor I copied the hole folder into pico/plugins (Meaning I created a pico/plugins/PicoEditor folder) and added a few lines in config.php.

$config['PicoEditor'] = array(
    'enabled' => true,
    'password' => '[..my very own SHA-512 generated password..]'
);

Afterwards the following message appeared:

Fatal error: Class 'AbstractPicoPlugin' not found in C:\xampp\htdocs\jjc\vendor\picocms\pico\plugins\PicoEditor\PicoEditor.php on line 28

Now when I delete the PicoEditor folder I get a similar error

Fatal error: Class 'AbstractPicoPlugin' not found in C:\xampp\htdocs\jjc\vendor\picocms\pico\plugins\PicoTags.php on line 24

Ps: I've also tryed copying all the content of the PicoEditor folder directly inside pico/plugins without any successful result either. I can only delete both to preview the default pico front page, but I'm afraid I really need those plugins :(

Ps2: Sorry for such a long post.

PhrozenByte commented 8 years ago

Can you please provide us the contents of the files composer.lock, vendor/composer/autoload_namespaces.php and vendor/composer/installed.json?

AeonFr commented 8 years ago

Yes of course. This is composer.lock

{
    "_readme": [
        "This file locks the dependencies of your project to a known state",
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
        "This file is @generated automatically"
    ],
    "hash": "84806675447f7a95d4f79cc45d928128",
    "content-hash": "445c22d963668182069bdfef2ec49989",
    "packages": [
        {
            "name": "michelf/php-markdown",
            "version": "1.3",
            "source": {
                "type": "git",
                "url": "https://github.com/michelf/php-markdown.git",
                "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/michelf/php-markdown/zipball/fcdd3e0781ae40c2b9847874e0755ff4f5559688",
                "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688",
                "shasum": ""
            },
            "require": {
                "php": ">=5.3.0"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-lib": "1.3.x-dev"
                }
            },
            "autoload": {
                "psr-0": {
                    "Michelf": ""
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "BSD-3-Clause"
            ],
            "authors": [
                {
                    "name": "Michel Fortin",
                    "email": "michel.fortin@michelf.ca",
                    "homepage": "http://michelf.ca/",
                    "role": "Developer"
                },
                {
                    "name": "John Gruber",
                    "homepage": "http://daringfireball.net/"
                }
            ],
            "description": "PHP Markdown",
            "homepage": "http://michelf.ca/projects/php-markdown/",
            "keywords": [
                "markdown"
            ],
            "time": "2013-04-11 18:53:11"
        },
        {
            "name": "nikic/fast-route",
            "version": "v0.6.0",
            "source": {
                "type": "git",
                "url": "https://github.com/nikic/FastRoute.git",
                "reference": "31fa86924556b80735f98b294a7ffdfb26789f22"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22",
                "reference": "31fa86924556b80735f98b294a7ffdfb26789f22",
                "shasum": ""
            },
            "require": {
                "php": ">=5.4.0"
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "FastRoute\\": "src/"
                },
                "files": [
                    "src/functions.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "BSD-3-Clause"
            ],
            "authors": [
                {
                    "name": "Nikita Popov",
                    "email": "nikic@php.net"
                }
            ],
            "description": "Fast request router for PHP",
            "keywords": [
                "router",
                "routing"
            ],
            "time": "2015-06-18 19:15:47"
        },
        {
            "name": "picocms/pico",
            "version": "v0.9",
            "source": {
                "type": "git",
                "url": "https://github.com/picocms/Pico.git",
                "reference": "4ef01ecc22d90f763535a15adce36f85cf621c28"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/picocms/Pico/zipball/4ef01ecc22d90f763535a15adce36f85cf621c28",
                "reference": "4ef01ecc22d90f763535a15adce36f85cf621c28",
                "shasum": ""
            },
            "require": {
                "michelf/php-markdown": "1.3",
                "php": ">=5.2.4",
                "twig/twig": "1.18.*"
            },
            "type": "library",
            "autoload": {
                "files": [
                    "lib/pico.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Gilbert Pellegrom",
                    "email": "gilbert@pellegrom.me"
                }
            ],
            "description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.",
            "homepage": "http://picocms.org/",
            "keywords": [
                "cms"
            ],
            "time": "2015-04-29 02:50:41"
        },
        {
            "name": "twig/twig",
            "version": "v1.18.2",
            "source": {
                "type": "git",
                "url": "https://github.com/twigphp/Twig.git",
                "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/twigphp/Twig/zipball/e8e6575abf6102af53ec283f7f14b89e304fa602",
                "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602",
                "shasum": ""
            },
            "require": {
                "php": ">=5.2.7"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "1.18-dev"
                }
            },
            "autoload": {
                "psr-0": {
                    "Twig_": "lib/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "BSD-3-Clause"
            ],
            "authors": [
                {
                    "name": "Fabien Potencier",
                    "email": "fabien@symfony.com",
                    "homepage": "http://fabien.potencier.org",
                    "role": "Lead Developer"
                },
                {
                    "name": "Armin Ronacher",
                    "email": "armin.ronacher@active-4.com",
                    "role": "Project Founder"
                },
                {
                    "name": "Twig Team",
                    "homepage": "http://twig.sensiolabs.org/contributors",
                    "role": "Contributors"
                }
            ],
            "description": "Twig, the flexible, fast, and secure template language for PHP",
            "homepage": "http://twig.sensiolabs.org",
            "keywords": [
                "templating"
            ],
            "time": "2015-06-06 23:31:24"
        }
    ],
    "packages-dev": [],
    "aliases": [],
    "minimum-stability": "stable",
    "stability-flags": [],
    "prefer-stable": false,
    "prefer-lowest": false,
    "platform": [],
    "platform-dev": []
}

autoload_namespaces.php

<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'Twig_' => array($vendorDir . '/twig/twig/lib'),
    'Michelf' => array($vendorDir . '/michelf/php-markdown'),
);

ínstalled.json

[
    {
        "name": "michelf/php-markdown",
        "version": "1.3",
        "version_normalized": "1.3.0.0",
        "source": {
            "type": "git",
            "url": "https://github.com/michelf/php-markdown.git",
            "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/michelf/php-markdown/zipball/fcdd3e0781ae40c2b9847874e0755ff4f5559688",
            "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688",
            "shasum": ""
        },
        "require": {
            "php": ">=5.3.0"
        },
        "time": "2013-04-11 18:53:11",
        "type": "library",
        "extra": {
            "branch-alias": {
                "dev-lib": "1.3.x-dev"
            }
        },
        "installation-source": "dist",
        "autoload": {
            "psr-0": {
                "Michelf": ""
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "BSD-3-Clause"
        ],
        "authors": [
            {
                "name": "Michel Fortin",
                "email": "michel.fortin@michelf.ca",
                "homepage": "http://michelf.ca/",
                "role": "Developer"
            },
            {
                "name": "John Gruber",
                "homepage": "http://daringfireball.net/"
            }
        ],
        "description": "PHP Markdown",
        "homepage": "http://michelf.ca/projects/php-markdown/",
        "keywords": [
            "markdown"
        ]
    },
    {
        "name": "twig/twig",
        "version": "v1.18.2",
        "version_normalized": "1.18.2.0",
        "source": {
            "type": "git",
            "url": "https://github.com/twigphp/Twig.git",
            "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/twigphp/Twig/zipball/e8e6575abf6102af53ec283f7f14b89e304fa602",
            "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602",
            "shasum": ""
        },
        "require": {
            "php": ">=5.2.7"
        },
        "time": "2015-06-06 23:31:24",
        "type": "library",
        "extra": {
            "branch-alias": {
                "dev-master": "1.18-dev"
            }
        },
        "installation-source": "dist",
        "autoload": {
            "psr-0": {
                "Twig_": "lib/"
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "BSD-3-Clause"
        ],
        "authors": [
            {
                "name": "Fabien Potencier",
                "email": "fabien@symfony.com",
                "homepage": "http://fabien.potencier.org",
                "role": "Lead Developer"
            },
            {
                "name": "Armin Ronacher",
                "email": "armin.ronacher@active-4.com",
                "role": "Project Founder"
            },
            {
                "name": "Twig Team",
                "homepage": "http://twig.sensiolabs.org/contributors",
                "role": "Contributors"
            }
        ],
        "description": "Twig, the flexible, fast, and secure template language for PHP",
        "homepage": "http://twig.sensiolabs.org",
        "keywords": [
            "templating"
        ]
    },
    {
        "name": "picocms/pico",
        "version": "v0.9",
        "version_normalized": "0.9.0.0",
        "source": {
            "type": "git",
            "url": "https://github.com/picocms/Pico.git",
            "reference": "4ef01ecc22d90f763535a15adce36f85cf621c28"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/picocms/Pico/zipball/4ef01ecc22d90f763535a15adce36f85cf621c28",
            "reference": "4ef01ecc22d90f763535a15adce36f85cf621c28",
            "shasum": ""
        },
        "require": {
            "michelf/php-markdown": "1.3",
            "php": ">=5.2.4",
            "twig/twig": "1.18.*"
        },
        "time": "2015-04-29 02:50:41",
        "type": "library",
        "installation-source": "dist",
        "autoload": {
            "files": [
                "lib/pico.php"
            ]
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "MIT"
        ],
        "authors": [
            {
                "name": "Gilbert Pellegrom",
                "email": "gilbert@pellegrom.me"
            }
        ],
        "description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.",
        "homepage": "http://picocms.org/",
        "keywords": [
            "cms"
        ]
    },
    {
        "name": "nikic/fast-route",
        "version": "v0.6.0",
        "version_normalized": "0.6.0.0",
        "source": {
            "type": "git",
            "url": "https://github.com/nikic/FastRoute.git",
            "reference": "31fa86924556b80735f98b294a7ffdfb26789f22"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22",
            "reference": "31fa86924556b80735f98b294a7ffdfb26789f22",
            "shasum": ""
        },
        "require": {
            "php": ">=5.4.0"
        },
        "time": "2015-06-18 19:15:47",
        "type": "library",
        "installation-source": "dist",
        "autoload": {
            "psr-4": {
                "FastRoute\\": "src/"
            },
            "files": [
                "src/functions.php"
            ]
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "BSD-3-Clause"
        ],
        "authors": [
            {
                "name": "Nikita Popov",
                "email": "nikic@php.net"
            }
        ],
        "description": "Fast request router for PHP",
        "keywords": [
            "router",
            "routing"
        ]
    }
]

Edit : in case it's somehow relevant I'm posting my full config file here

<?php
$config['site_title'] = 'JJC, Insumos Odontológicos';
$config['base_url'] = '/vendor/picocms/pico';
//$config['theme'] = 'mytheme';

# https://github.com/PontusHorn/Pico-Tags
# https://github.com/gilbitron/Pico-Editor-Plugin

$config['PicoEditor'] = array(
    'enabled' => true,
    'password' => '{my shapassword}'
);
# https://github.com/shawnsandy/adv-meta
$config['custom_meta_values'] = array(
  //page slug keep lower case
  'slug' => 'Slug',
  //page category
  'category' => 'Category',
  //page status
  'status' => 'Status',
  //Type -- page, post, plugin. It is used in twig like this: {{ page.type }}
  'type' => 'Type',
  //Page Thumbnail -- (theme/images)
  'thumbnail' => 'Thumbnail',
  // image for page icon -- (theme/images/)
  'icon' => 'Icon',
  //use custom page template(s)
  'tpl' => 'Tpl');
PhrozenByte commented 8 years ago

Hmm... composer installed Pico v0.9 instead of the current v1.0.0-beta.1. Can you please also provide your composer.json? When did you run this installation?

AeonFr commented 8 years ago
{
    "name": "picocms/pico",
    "type": "library",
    "description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.",
    "keywords": ["cms"],
    "homepage": "http://picocms.org/",
    "license": "MIT",
    "authors": [
        {
            "name": "Gilbert Pellegrom",
            "email": "gilbert@pellegrom.me"
        }
    ],
    "require": {
        "php": ">=5.2.4",
        "twig/twig": "1.18.*",
        "michelf/php-markdown": "1.3"
    },
    "autoload": {
        "files": ["lib/pico.php"]
    }
}

ps: I just installed it today in my computer with php composer.phar require picocms/pico

PhrozenByte commented 8 years ago

I'm not referring to Pico's composer.json at vendor/pico/picocms/composer.json, I need your custom (root) composer.json.

AeonFr commented 8 years ago

Oh, sorry :dizzy_face:

{
    "require": {
        "picocms/pico": "^0.9.0",
        "nikic/fast-route": "^0.6.0"
    }
}
PhrozenByte commented 8 years ago

There it is :wink:

You can't use plugins for Pico 1.0 with Pico 0.9 and older. We highly recommend you to upgrade to the current v1.0.0-beta.1.

AeonFr commented 8 years ago

Thanks for the help !