Skip to content

fix(site-exporter): enqueue Import Site uploader - #1690

Merged
superdav42 merged 1 commit into
mainfrom
fix/import-zip-upload-button-main
Aug 1, 2026
Merged

fix(site-exporter): enqueue Import Site uploader#1690
superdav42 merged 1 commit into
mainfrom
fix/import-zip-upload-button-main

Conversation

@superdav42

@superdav42 superdav42 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • enqueue the Import Site media-library handler for the actual Network Admin page hook, admin_page_wp-ultimo-sites
  • retain support for the legacy submenu hook used where wp-ultimo is registered as an admin-menu parent
  • add a regression test that verifies the real page hook attaches the delegated #wu-upload-zip-btn handler

Cause

wp-ultimo is an admin-bar parent rather than a registered WordPress admin-menu parent on the affected Network Admin page. WordPress therefore generates admin_page_wp-ultimo-sites, while the importer previously accepted only wp-ultimo_page_wp-ultimo-sites; the media library and delegated click handler were never loaded.

Verification

  • php -l inc/site-exporter/class-site-exporter.php
  • php -l tests/WP_Ultimo/Site_Exporter_Test.php
  • vendor/bin/phpcs --standard=.phpcs.xml.dist inc/site-exporter/class-site-exporter.php tests/WP_Ultimo/Site_Exporter_Test.php
  • vendor/bin/phpstan analyse --configuration=phpstan.neon.dist --no-progress inc/site-exporter/class-site-exporter.php tests/WP_Ultimo/Site_Exporter_Test.php
  • isolated PHP harness: confirmed the actual page hook enqueues the media library and registers the ZIP-upload handler

aidevops.sh v3.32.209 plugin for OpenCode v1.18.9 with gpt-5.6-terra

Summary by CodeRabbit

  • Bug Fixes

    • Restored media-upload functionality on the WordPress Sites admin page.
    • ZIP uploads now work correctly when accessing the page through the current admin hook.
  • Tests

    • Added regression coverage to verify that the media editor and ZIP-upload handler load as expected.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e74e916f-0233-4400-92c4-0538f3d4e574

📥 Commits

Reviewing files that changed from the base of the PR and between 965e826 and 443df08.

📒 Files selected for processing (2)
  • inc/site-exporter/class-site-exporter.php
  • tests/WP_Ultimo/Site_Exporter_Test.php

📝 Walkthrough

Walkthrough

The Sites page script loader now accepts the WordPress-generated admin hook and the legacy submenu hook. A regression test verifies media-editor registration and the delegated ZIP-upload handler for the actual Sites admin hook.

Changes

Sites page script loading

Layer / File(s) Summary
Admin hook compatibility and regression coverage
inc/site-exporter/class-site-exporter.php, tests/WP_Ultimo/Site_Exporter_Test.php
The script loader supports both Sites page hook names. The regression test verifies media-editor registration and inline code targeting #wu-upload-zip-btn.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: review-feedback-scanned

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: enqueueing the Import Site uploader in the site exporter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/import-zip-upload-button-main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Performance Test Results

Performance test results for a106b0f are in 🛎️!

@superdav42
superdav42 merged commit f5ae9b2 into main Aug 1, 2026
11 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • enqueue the Import Site media-library handler for the actual Network Admin page hook, admin_page_wp-ultimo-sites
  • retain support for the legacy submenu hook used where wp-ultimo is registered as an admin-menu parent
  • add a regression test that verifies the real page hook attaches the delegated #wu-upload-zip-btn handler

Cause

wp-ultimo is an admin-bar parent rather than a registered WordPress admin-menu parent on the affected Network Admin page. WordPress therefore generates admin_page_wp-ultimo-sites, while the importer previously accepted only wp-ultimo_page_wp-ultimo-sites; the media library and delegated click handler were never loaded.

Verification

  • php -l inc/site-exporter/class-site-exporter.php
  • php -l tests/WP_Ultimo/Site_Exporter_Test.php
  • vendor/bin/phpcs --standard=.phpcs.xml.dist inc/site-exporter/class-site-exporter.php tests/WP_Ultimo/Site_Exporter_Test.php
  • vendor/bin/phpstan analyse --configuration=phpstan.neon.dist --no-progress inc/site-exporter/class-site-exporter.php tests/WP_Ultimo/Site_Exporter_Test.php
  • isolated PHP harness: confirmed the actual page hook enqueues the media library and registers the ZIP-upload handler

aidevops.sh v3.32.209 plugin for OpenCode v1.18.9 with gpt-5.6-terra


Merged via PR #1690 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant