-
Notifications
You must be signed in to change notification settings - Fork 18
Fix: Weird popup in Media Uploader modal #1432 #1440
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
base: develop
Are you sure you want to change the base?
Conversation
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (12)📁 inc/classes/wpforms/wpforms-field-godam-record-frontend.php (1 error)
📁 inc/classes/wpforms/wpforms-field-godam-record-entry-view.php (1 error)
📁 inc/classes/wpforms/wpforms-field-godam-record-entry-edit.php (1 error)
📁 inc/classes/class-rewrite.php (1 error)
📁 inc/classes/class-elementor-widgets.php (1 error)
📁 inc/classes/everest-forms/everest-forms-field-godam-record-frontend.php (1 error)
📁 inc/classes/assets/class-ima-assets.php (1 error)
📁 inc/classes/assets/class-jetpack-form-assets.php (1 error)
📁 inc/classes/class-video-preview.php (1 error)
📁 inc/classes/lifter-lms/class-lifter-lms.php (1 error)
📁 inc/classes/fluentforms/class-form-submit.php (1 error)
📁 inc/classes/class-video-engagement.php (1 error)
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
missing_composer_json_file | The "/vendor" directory using composer exists, but "composer.json" file is missing. |
📁 readme.txt (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 inc/classes/media-library/class-media-folder-utils.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
91 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_clause used in $wpdb->get_var($wpdb->prepare(\n\t\t\t\t"\n\t\t\tSELECT COUNT(DISTINCT p.ID)\n\t\t\tFROM {$wpdb->posts} p\n\t\t\tINNER JOIN {$wpdb->term_relationships} tr ON p.ID = tr.object_id\n\t\t\tINNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id = tt.term_taxonomy_id\n\t\t\tWHERE {$where_clause}\n\t\t",\n\t\t\t\t$query_params\n\t\t\t))\n$where_clause assigned unsafely at line 82:\n $where_clause .= ' AND p.post_mime_type LIKE %s'\n$query_params[] used without escaping.\n$mime_type used without escaping. |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?p=1 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?page_id=2 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?attachment_id=6 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?p=1 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?page_id=2 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?attachment_id=6 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
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.
Pull request overview
This PR fixes a UI issue where closing the folder creation modal within the Media Uploader flow leaves a white background popup stuck on screen. The fix adds the bodyOpenClassName prop to the FolderCreationModal component to ensure proper body state management when the modal opens and closes.
Key Changes:
- Added
bodyOpenClassName="folder-creation-modal-open"prop to the Modal component in FolderCreationModal
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| title={ __( 'Create a new folder', 'godam' ) } | ||
| onRequestClose={ () => dispatch( closeModal( 'folderCreation' ) ) } | ||
| className="modal__container" | ||
| bodyOpenClassName="folder-creation-modal-open" |
Copilot
AI
Jan 1, 2026
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.
Consider adding bodyOpenClassName to other modals (DeleteModal and RenameModal) for consistency. If the issue described in the PR (nested modal conflicts in Media Uploader) only affects FolderCreationModal, this is fine. However, if DeleteModal or RenameModal can also be opened from within the Media Uploader modal flow, they may experience similar issues and should also have unique bodyOpenClassName values (e.g., "delete-modal-open", "rename-modal-open").
Problem
When using Replace → Media Library → New folder, a modal popup appears. Closing it leaves a white background popup stuck and the UI behaves incorrectly, with another popup visible on top.
Root Cause (observed)
The folder creation modal did not apply a dedicated bodyOpenClassName, which can cause modal/backdrop/body-state handling issues (e.g., leftover overlay/body state) when nested within the Media Uploader modal flow.
Solution
Add a bodyOpenClassName to the folder creation modal so opening/closing the modal consistently toggles a predictable body class for styling/state cleanup.
Change
Issue: #1432