Giter Site home page Giter Site logo

Comments (6)

DenisLanz avatar DenisLanz commented on June 2, 2024 1

I'm not a composer expert but I alter my folder structure by using kirby-cms-path and kirby-plugin-path in my composer file. If I install your plugin through composer - which is btw. confusing in your readme you write composer require sylvainjule/kirby-embed in the composer file you name it differntly composer require sylvainjule/embed and in the plugins folder it is named imagereadio - you should stick to something ;)

Anyway I get the following stacktrace, that tells me that something is odd while loading the rquired components for your plugin:

( ! ) Warning: require_once([…]/build/site/plugins/imageradio/vendor/autoload.php): failed to open stream: No such file or directory in […]/build/site/plugins/imageradio/index.php on line 3
Call Stack
#	Time	Memory	Function	Location
1	0.0004	425288	{main}( )	.../index.php:0
2	0.0019	541904	Kirby\Cms\App->__construct( )	.../index.php:6
3	0.0048	836736	Kirby\Cms\App->extensionsFromPlugins( )	.../App.php:119
4	0.0048	836736	Kirby\Cms\App->plugins( )	.../AppPlugins.php:546
5	0.0048	836736	Kirby\Cms\App->pluginsLoader( )	.../AppPlugins.php:689
6	0.0057	855280	include_once( '[…]/build/site/plugins/imageradio/index.php' )	.../AppPlugins.php:723

from kirby-embed.

DenisLanz avatar DenisLanz commented on June 2, 2024 1

Found the issue, as also written in the Kirby guideline (https://getkirby.com/docs/guide/plugins/plugin-setup-composer#support-for-plugin-installation-without-composer) you should not require the the autoloader but use include_once instead:

@include_once __DIR__ . '/vendor/autoload.php';

fixes the issue. Pretty simple. Now you just need to straighten out the naming.

from kirby-embed.

sylvainjule avatar sylvainjule commented on June 2, 2024

Apologies I'm not sure to understand what's expected, what would you want me to load with the load helper? Any hint welcome. 🙂

from kirby-embed.

sylvainjule avatar sylvainjule commented on June 2, 2024

Thank you for taking the time to dig through it, I've made the change!

Also fixed the naming disparity, that's what happens when you use another of your field as a boilerplate and make stuff public too quickly :)

from kirby-embed.

DenisLanz avatar DenisLanz commented on June 2, 2024

I keep getting the old index.php and the old folder naming even though I cleared the composer cache and reset my project, even on another computer I keep getting the old version installing from scratch - I think you need to bump the version in order for composer to recognise the chance, or am I wrong?

Running composer install -vvv after composer clear-cache and removing the composer.lock shows that packagist is delivering the old version for version 1.0.0.

from kirby-embed.

sylvainjule avatar sylvainjule commented on June 2, 2024

Apologies, I didn't publish the release. Fixed!

from kirby-embed.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.