Open wimkroegman opened 1 year ago
I ran into the same issue. Tried forking the repo and updating the Composer installer to 2.0. Didn't work.
In the end I ran composer install
in the plugin folder and added the plugin to my website's repo. I'm not happy with the 9063 files being added, but don't see how else I can use this plugin.
@wimkroegman I finally did get it working without including all the dependencies. I ran composer dumpautoload
in the plugins folder and it created the autoload classes it needed.
Hi, I'm sorry.
I tried to use composer as you mention, or downloading the zip from releases ... and set the plugins in the mu-plugins but nothing works. Is there a way to download the plugin without any use of composer?
Thx @stefthoen. Will have a look at your solution.
having the same issues as the above
Here's a link to the fork that includes the the autoload files. I'm not planning to maintain it and keep it in sync with this repo. @ferdydurque @thebananaland
Don't get it. The instructions don't say anything about composer (whatever that is) being a requirement. Can someone from the developer team confirm this? Is using composer REQUIRED or not?
I have tried a regular plugin install AND placing the release (downloaded from the release page as instructed!) in the mu-plugins folder. Neither works.
"No suitable autoloader found. Multisite Global Media cannot be loaded correctly." never goes away.
@peteratomic this plugin hasn't been updated in a while and the main developer is unresponsive, so I don't think you'll get an answer anytime soon.
Composer is a PHP dependency manager. It's like npm for PHP. You can use Composer to pull in packages from packagist.org, but you can also use it to create an autoloader. This is a file that tells your PHP project where it can find the classes that your code needs.
If you need to use a class in another file you use to do require, or require_once
. With namespacing, and file import using use
, that's no longer necessary.
The developer of this plugin requires a autoload file, but forgot to include one in this codebase. You need to generate it yourself.
thanks @stefthoen !
Hi. I found this same issue too so here is steps that I did and it helped me. I just share in case if someone don't familiar with composer.
wp-content/mu-plugins/load.php
then put content like this.
<?php
require_once ABSPATH.'vendor/autoload.php';
require_once WPMU_PLUGIN_DIR.'/multisite-global-media/multisite-global-media.php';
If you do this way then it won't throw error. I tested and it works for PHP. (I found other issue on JS on latest Wordpress but it's another topic.)
BTW I think someone might aware as exists of Composer\Installers
as it's required library for install plugin via composer but you won't need to worry. Composer won't load class if no one call it. so no need to worry. If someone want to prove it then you can put var_dump
and die
in vendor/composer/installers/src/Composer/Installers/Installer.php
to test it.
Hi, I keep on getting a 'No suitable autoloader found' message with the 0.2.0 version. I've used the .zip file in the tagged version and tried to build via composer. Both give the same error.
Also clearing browser cache and installing new WP installs doesn't help.
When I use 0.1.0-beta, all works fine. Any suggestions?