plugin-update-checker icon indicating copy to clipboard operation
plugin-update-checker copied to clipboard

Fatal error: Uncaught Error: Class 'PucReadmeParser' not found

Open jefferykarbowski opened this issue 4 years ago • 7 comments

I am getting this error when pressing "Check for Updates", cant seem to find where it is coming from:

Fatal error: Uncaught Error: Class 'PucReadmeParser' not found in /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/Api.php:68

Stack trace: #0 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php(163): Puc_v4p10_Vcs_Api->getRemoteReadme('2.1.4')

#1 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php(91): Puc_v4p10_Vcs_PluginUpdateChecker->setInfoFromRemoteReadme('2.1.4', Object(Puc_v4p10_Plugin_Info))

#2 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Plugin/UpdateChecker.php(152): Puc_v4p10_Vcs_PluginUpdateChecker->requestInfo(Array)

#3 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4 in /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/Api.php on line 68

Thank you for this plugin and your time!

jefferykarbowski avatar Sep 15 '20 19:09 jefferykarbowski

Here are two things to check:

  • It could be that you're just missing some files. Please make sure that this file exists in the update checker directory and it isn't empty: /vendor/PucReadmeParser.php
  • Do you use a Composer autoloader, or does your plugin require plugin-update-checker.php, or do you load the library in some other way? If it's Composer, try running composer dump-autoload. Normally that isn't necessary, but it could help if the existing autoloader files are out of date or messed up in some way.

YahnisElsts avatar Sep 16 '20 11:09 YahnisElsts

I had some issues with composer - when i had 2 plugins installed with plugin update capabilities installed. the require_once statement caused critical wp error - not sure why. Moving to the require plugin-update-checker.php seems to work ok.

I was also not sure if the composer.json file has all the dependancies referenced - as when i built it the vendor directory was quite empty - so i had to copy the vendor dir from your repo.

billybigpotatoes avatar May 25 '21 18:05 billybigpotatoes

The vendor directory in this repository is part of the source and not generated by Composer. If you install this library with Composer, it should automatically download everything including that directory. I just tested it with a fresh project and it put the directory at /vendor/yahnis-elsts/plugin-update-checker/vendor.

If you're downloading the library manually instead, you will need to include the vendor directory, too.

YahnisElsts avatar May 25 '21 19:05 YahnisElsts

It would be great if you can bundle your features via composer - we use composer in our plugins so we need it to function for other libs too.

Your lib deployed via composer - would be fabulous as we can also use composer to automate updates.

D.

On Tue, 25 May 2021 at 20:30, Yahnis Elsts @.***> wrote:

The vendor directory in this repository is part of the source and not generated by Composer. If you install this library with Composer, it should automatically download everything including that directory. I just tested it with a fresh project and it put the directory at /vendor/yahnis-elsts/plugin-update-checker/vendor.

If you're downloading the library manually instead, you will need to include the vendor directory, too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/YahnisElsts/plugin-update-checker/issues/389#issuecomment-848203537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIASXL4AITEEU456LG3K7LTPP3HDANCNFSM4RNS5XEA .

--

d

billybigpotatoes avatar May 26 '21 16:05 billybigpotatoes

What should i include in composer to pull in your packages?

billybigpotatoes avatar May 26 '21 16:05 billybigpotatoes

I'm not sure what you mean by "bundle your features via composer". Judging by the Packagist stats for this library, lots of people already use this package via Composer. Presumably, they also update it via Composer.

What should i include in composer to pull in your packages?

I think simply running this would be enough to add the necessary changes to composer.json: composer require yahnis-elsts/plugin-update-checker

Alternatively, you could do something like this to require the current version:

"require": {
    "yahnis-elsts/plugin-update-checker": "^4.11"
}

YahnisElsts avatar May 26 '21 16:05 YahnisElsts

Brilliant I will get testing

On Wed, 26 May 2021, 17:41 Yahnis Elsts, @.***> wrote:

I'm not sure what you mean by "bundle your features via composer". Judging by the Packagist stats for this library https://packagist.org/packages/yahnis-elsts/plugin-update-checker/stats, lots of people already use this package via Composer. Presumably, they also update it via Composer.

What should i include in composer to pull in your packages?

I think simply running this would be enough to add the necessary changes to composer.json: composer require yahnis-elsts/plugin-update-checker

Alternatively, you could do something like this to require the current version:

"require": { "yahnis-elsts/plugin-update-checker": "^4.11" }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/YahnisElsts/plugin-update-checker/issues/389#issuecomment-848935741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIASXJY2U7OVKBJXZOVQETTPUQEJANCNFSM4RNS5XEA .

billybigpotatoes avatar May 26 '21 19:05 billybigpotatoes