Skip to content

#1950 Fix - Plugins page fatal when Everest Forms is active on PHP 8 - #1556

Merged
SidTGV merged 3 commits into
developfrom
1950-sdk-deactivation-labels-merge
Oct 17, 2026
Merged

SidTGV merged 3 commits into
developfrom
1950-sdk-deactivation-labels-merge

Conversation

@saurab018

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes themegrill/user-registration-pro#1950 .

Problem: with User Registration & Membership (free 5.3.0 / Pro 6.3.0) and Everest Forms (free or Pro) active on PHP 8, wp-admin → Plugins shows a blank page / critical error. The rest of the site works.

Root cause: UR_SDK_Deactivation_Feedback::patch_sdk_labels_after_init() (includes/admin/class-ur-sdk-deactivation-feedback.php) replaced \ThemeGrillSDK\Loader::$labels['uninstall']['options'] with URM's four labels (id3, id4, id5, id999). That static is shared by every ThemeGrill SDK product on the site. Everest Forms' deactivation popup still uses the SDK default options (id3–id6, id999), so id6 has no label → null → array_key_exists(): Argument #2 ($array) must be of type array, null given in themegrill-sdk/src/Modules/UninstallFeedback.php:502. The popups are rendered on every Plugins page load, so just opening the page crashes (PHP 7.4 only warns).

Fix: merge URM's labels into the shared list (array_merge) instead of replacing it — the 6.2.8 behaviour. URM's own popup is unchanged: its options still come from the user_registration_feedback_deactivate_options filter, so it still shows only its four reasons. Docblock/comment updated to match.

Not changed (known, cosmetic): URM still writes its heading and reason wording into the shared labels, so Everest Forms' popup shows "Why are you parting ways with the URM plugin?". Scoping the text to URM's own popup is a separate follow-up.

Repo note: this file is synced from free into Pro, so the same one-line change is opened in both repos (free: wpeverest/user-registration, Pro: themegrill/user-registration-pro). Otherwise the next free → Pro sync would bring the replace back.

PHPCS: clean — 0 errors, 0 warnings on the changed file (project phpcs.xml, wpeverest-sniffs).

How to test the changes in this Pull Request:

Preconditions: PHP 8.x, Everest Forms (and optionally Everest Forms Pro) active, WP_DEBUG_LOG on.

  1. Before (current release): activate User Registration & Membership 5.3.0 / 6.3.0. Open Plugins → page is blank / critical error; debug log shows Undefined array key "id6" and the array_key_exists() TypeError in UninstallFeedback.php:502.
  2. After (this branch): activate this build instead. Open Plugins → list loads normally; no new errors in the debug log.
  3. Click Deactivate under Everest Forms and Everest Forms Pro → each popup opens with 5 reasons, every reason has its text (incl. "It's a temporary deactivation…").
  4. Click Deactivate under User Registration & Membership → URM popup opens with its own 4 reasons only. Click Skip & Deactivate → plugin deactivates and the Plugins page reloads fine.
  5. Regression: with Everest Forms inactive, URM's popup and the Plugins page behave as before.

Verified locally (PHP 8.2, Everest Forms 3.6.2 + Everest Forms Pro, Pro 6.3.0 + this change): steps 1–4 pass. A temporary snippet doing the same merge is live on the reporting customer's site and fixed it there too.

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (modification of the currently available functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully ran tests with your changes locally?
  • Have you updated the documentation accordingly? (not needed — no user-facing docs change)

Changelog entry

Fix - Plugins page blank on PHP 8 when Everest Forms is also active.

@saurab018 saurab018 self-assigned this Oct 17, 2026
@tg-autopilot
tg-autopilot requested a lite review from Copilot October 17, 2026 06:59
@github-actions

Copy link
Copy Markdown

QA suite — refused, no regression spec

This PR changes product source but adds no spec, so the suite was
refused before booting WordPress — running it just to report the same
thing at the end costs runner minutes for nothing. Run
/claudegrill:verify-fix locally and let write-spec add the guard
to this branch, then push again.

Source files changed with no matching spec
includes/admin/class-ur-sdk-deactivation-feedback.php

@github-actions

Copy link
Copy Markdown

PHPCS results

✅ No PHPCS issues found.

@tg-autopilot

tg-autopilot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Build for 63811f97 is ready 🛎️

⬇️ Download user-registration-5.3.1.zip (8.2M)

🚀 Try this PR in a live test site (a fresh WordPress opens in your browser with this build installed and you logged in as admin; it resets when you close the tab)

Installs directly via Plugins → Add New → Upload Plugin.
Link expires in 30 days · updated Oct 17, 2026 4:39 PM +0545

A later push only rebuilds this if its commit message includes #build-zip.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Add a focused regression test confirming shared labels, including id6, are preserved.

1 open issue
What changed in this PR

Fixes a PHP 8 fatal error on the Plugins page by preserving shared ThemeGrill SDK labels when Everest Forms and User Registration are active.

Changes:

  • Merge URM labels instead of replacing shared SDK labels.
  • Update related documentation and comments.
File Summary
includes/​admin/​class-ur-sdk-deactivation-feedback.php Preserves labels required by other ThemeGrill SDK products.

Review effort: Lite

Comment on lines +199 to +202
\ThemeGrillSDK\Loader::$labels['uninstall']['options'] = array_merge(
\ThemeGrillSDK\Loader::$labels['uninstall']['options'],
$our_options
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in ee35ec6: deactivation-popup.spec.ts now asserts patch_sdk_labels_after_init() writes Loader::$labels['uninstall']['options'] exactly once, via array_merge with the existing labels first. Verified it fails against the pre-fix replace code and passes on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

PHPCS results

✅ No PHPCS issues found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SidTGV
SidTGV merged commit c76998d into develop Oct 17, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants