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

Error: Class "Thathoff\\GitContent\\KirbyGit" not found #116

Open
wout opened this issue Dec 30, 2024 · 2 comments
Open

Error: Class "Thathoff\\GitContent\\KirbyGit" not found #116

wout opened this issue Dec 30, 2024 · 2 comments

Comments

@wout
Copy link

wout commented Dec 30, 2024

I installed this plugin in my latest 4.5 project, and I'm getting the following error:

2024-12-30T09:19:32.411845499Z [Mon Dec 30 10:19:32.411684 2024] [php:notice] [pid 9] [client 127.0.0.1:51162] Error: Class "Thathoff\\GitContent\\KirbyGit" not found in /var/www/html/site/plugins/git-content/index.php:11\nStack trace:\n#0 /var/www/html/kirby/src/Filesystem/F.php(440): include_once()\n#1 /var/www/html/kirby/src/Http/Response.php(210): Kirby\\Filesystem\\F::Kirby\\Filesystem\\{closure}()\n#2 /var/www/html/kirby/src/Filesystem/F.php(443): Kirby\\Http\\Response::guardAgainstOutput()\n#3 /var/www/html/kirby/src/Cms/AppPlugins.php(797): Kirby\\Filesystem\\F::loadOnce()\n#4 /var/www/html/kirby/src/Cms/AppPlugins.php(764): Kirby\\Cms\\App->pluginsLoader()\n#5 /var/www/html/kirby/src/Cms/AppPlugins.php(640): Kirby\\Cms\\App->plugins()\n#6 /var/www/html/kirby/src/Cms/App.php(146): Kirby\\Cms\\App->extensionsFromPlugins()\n#7 /var/www/html/public/index.php(27): Kirby\\Cms\\App->__construct()\n#8 {main}
2024-12-30T09:19:32.414061515Z 127.0.0.1 - - [30/Dec/2024:10:19:32 +0100] "GET /healthcheck HTTP/1.1" 500 426 "-" "curl/8.5.0"

It works locally, but it does not after being deployed to the server (Docker). This seems like an auto-loading issue, but I'm not sure where to start looking.

@thathoff
Copy link
Owner

thathoff commented Jan 1, 2025

Can you give some more information about how you’ve installed the plugin? Via Composer? Just by adding it to the plugins folder?

@wout
Copy link
Author

wout commented Jan 1, 2025

Hi, and happy new year!

I installed it via composer. My app uses a modified data structure:

// public/index.php

require ($root = dirname(__DIR__)) . '/kirby/bootstrap.php';

// ... environment and error reporting setup, etc.

// Configure kirby app with root level data structure
$kirby = new Kirby([
  'roots' => [
    'index'    => __DIR__,
    'base'     => $root,
    'content'  => $root . '/content',
    'site'     => $root . '/site',
    'storage'  => $storage = $root . '/storage',
    'license'  => $storage . '/.license',
    'accounts' => $storage . '/accounts',
    'cache'    => $storage . '/cache',
    'sessions' => $storage . '/sessions'
  ]
]);

echo $kirby->render();

Not sure if it makes any difference since the plugin loads fine locally. It's only after deploying that it crashes the app.

Let me know if you need any more info

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