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 message when bulk updating plugins #3510

Open
ghost opened this issue Jan 4, 2022 · 5 comments
Open

Error message when bulk updating plugins #3510

ghost opened this issue Jan 4, 2022 · 5 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jan 4, 2022

The recent update to grav and plugins showed a message saying 4 plugins need updating. When I proceeded with the bulk update it gave this error message:

update

Two plugins were not updated - email and flex objects. However I was successfully able to do these manually.

Further testing on other sites found:

  1. I did flex objects first... fine. Then I did admin... also fine, and it also updated email and login automatically.
  2. I tried admin first and it did the other 3 automatically.
@rhukster
Copy link
Member

rhukster commented Jan 5, 2022

@mahagr can you please take a look at this?

@mahagr
Copy link
Member

mahagr commented Jan 5, 2022

I think this is again related to opcache default settings, where it checks the changes in the classes every 2 seconds. The easiest way to fix this kind of issue is to handle updates separately, using a separate entry point to do it.

@mahagr
Copy link
Member

mahagr commented Jan 5, 2022

Hmm. The autoloader that breaks in this instance comes from the new Admin version. This means that the issue seems to be slightly different from the previous issue we saw; PHP may be loading the old version of the class inside /vendor/composer/autoload_real.php file after loading the updated vendor/autolaod.php file.

Hmm.. I just looked into PHP docs and it looks like opcache_reset() works only once per script and should be only called in the end of the script.

@rhukster
Copy link
Member

BTW, i've noticed this a few times in recent updates. I just run update a second time and it finishes the rest of the plugins. So annoying and frustrating that an error displays and means it takes 2 tries, but not breaking anything.

@ghost
Copy link
Author

ghost commented Mar 11, 2022

Since posting this issue I have done a lot more updates and had no problems at all. Everything has gone smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants