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

Kirby crashes on latest version when plugin is installed as git submodule #14

Open
nelhop opened this issue Mar 6, 2021 · 7 comments
Open

Comments

@nelhop
Copy link

nelhop commented Mar 6, 2021

After Updating better-rest to its latest version (1.2.8) Kirby (3.5.3.1) throws an ErrorException on startup:

Whoops\Exception\ErrorException thrown with message "include(.../site/plugins/better-rest/vendor/composer/../../tests/kirby/src/Cms/Plugin.php): failed to open stream: No such file or directory"  Stacktrace:
#11 Whoops\Exception\ErrorException in .../kirby/vendor/composer/ClassLoader.php:444
#10 include in .../kirby/vendor/composer/ClassLoader.php:444
#9 Composer\Autoload\includeFile in .../kirby/vendor/composer/ClassLoader.php:322
#8 Composer\Autoload\ClassLoader:loadClass in [internal]:0
#7 spl_autoload_call in .../kirby/src/Cms/AppPlugins.php:748
#6 Kirby\Cms\App:plugin in .../site/plugins/better-rest/index.php:26
#5 include_once in .../kirby/src/Toolkit/F.php:418
#4 Kirby\Toolkit\F:loadOnce in .../kirby/src/Cms/AppPlugins.php:809
#3 Kirby\Cms\App:pluginsLoader in .../kirby/src/Cms/AppPlugins.php:780
#2 Kirby\Cms\App:plugins in .../kirby/src/Cms/AppPlugins.php:601
#1 Kirby\Cms\App:extensionsFromPlugins in .../kirby/src/Cms/App.php:124 #0 Kirby\Cms\App:__construct in .../index.php:5

better-rest-error

@robinscholz
Copy link
Owner

Should be fixed with the latest release

@nelhop
Copy link
Author

nelhop commented May 28, 2021

Unfortunately this issue is not fixed with the latest release.

It seems that /tests/kirby needs to be in the repository, but its listed in the .gitignore

@robinscholz
Copy link
Owner

could you provide a repository with a reproduction of the bug?

@robinscholz robinscholz reopened this May 28, 2021
@nelhop
Copy link
Author

nelhop commented May 28, 2021

Here you go: https://github.com/nelhop/kirby_better-rest

This is just the Kirby starterkit and better-rest as a git submodule.

@robinscholz
Copy link
Owner

@nelhop Could you try deleting the vendor folder from site/plugins/better-rest ? That should do the trick.

@robinscholz robinscholz changed the title Kirby crashes on latest version Kirby crashes on latest version when plugin is installed as git submodule Jun 2, 2021
@nelhop
Copy link
Author

nelhop commented Jun 4, 2021

@nelhop Could you try deleting the vendor folder from site/plugins/better-rest ? That should do the trick.

@robinscholz This makes Kirby available again, but crashes the API itself:

{
    "status": "error",
    "exception": "Error",
    "code": 0,
    "message": "Class 'Robinscholz\\Betterrest' not found",
    "details": null,
    "file": "plugins/better-rest/index.php",
    "line": 22
}

@robinscholz
Copy link
Owner

@nelhop Running composer dist inside site/plugins/better-rest fixes the issue for me. I'll have to talk to the kirby team to get a better understanding why this error occurs. Maybe @bnomei has an idea?

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

2 participants