-
Notifications
You must be signed in to change notification settings - Fork 101
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
VIP Parse.ly: Check for Support User class exists in the vip-parsely plugin #6016
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6016 +/- ##
=============================================
+ Coverage 30.52% 30.53% +0.01%
Complexity 4811 4811
=============================================
Files 289 289
Lines 21175 21165 -10
=============================================
Hits 6463 6463
+ Misses 14712 14702 -10 ☔ View full report in Codecov by Sentry. |
This still isn't quite the best fix and likely bound to cause other problems in the future. It suggests that someone (customer code or our code) is doing something in a context they shouldn't. If our short-term goal is to just stop the fatals from happening, I would just do a |
Thank you for the feedback @mjangda!
I don't think that is anything wrong per-se in the customer code that triggers this issue: there is an API preload that runs on Since I think part of the problem is having the VIP Support plugin not loading on this specific scenario (
Yes, that's partly the reason why I tried to keep that logic outside the I'm going to change it to check for the class inside the callback as suggested, so we can stop the fatals that are currently happening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- vip-parsely/vip-parsely.php: Language not supported
@sjinks, the Copilot review doesn't seem to have worked. Are we OK to merge this? If yes, feel free to do so. |
Quality Gate passedIssues Measures |
Description
This PR adds a new defensive check in the VIP Parse.ly plugin, that prevents the VIP-specific customizations of the WP Parse.ly plugin to load when
WP_INSTALLING
is set and true.This fixes a fatal error being thrown when accessing the
example.com/wp-activate.php
URL. Since thevip-support
plugin is not loaded whenWP_INSTALLING
is defined, this extra validation short circuits thewp_parsely_current_user_can_use_pch_feature
callback to return the original value, if theAutomattic\VIP\Support_User\User
class does not exists.Changelog Description
Fixed
Pre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist