Opened 10 years ago
Closed 10 years ago
#29520 closed defect (bug) (fixed)
WP 4.0 "add media" button on edit page not functioning
Reported by: | lcody | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.0.1 | Priority: | normal |
Severity: | major | Version: | 4.0 |
Component: | Media | Keywords: | has-patch commit fixed-major |
Focuses: | ui, javascript, administration | Cc: |
Description
Happens on edit.php
console returns this error on page load:
Uncaught Error: Syntax error, unrecognized expression: [name=] load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,json2&ver=4.0:2
and console returns this error onclick of 'add media' button:
Uncaught TypeError: Cannot read property 'hasClass' of undefined load-scripts.php?c=1&load%5B%5D=hoverIntent,common,admin-bar,schedule,wp-ajax-response,autosave,jqu…:1045
Attachments (1)
Change History (24)
#2
@
10 years ago
- Resolution set to worksforme
- Status changed from new to closed
My bad, plugin caused the issue. I thought I had updated it, but apparently I had not.
#4
@
10 years ago
What was the plugin? We don't like it when things break in an update, even if it's the plugin's "fault," so it helps to know so we can look into it.
#5
@
10 years ago
Plugin was Post Types Order, found at https://wordpress.org/plugins/post-types-order/. Updating the plugin fixed all issues.
#6
follow-up:
↓ 7
@
10 years ago
- Resolution worksforme deleted
- Severity changed from normal to major
- Status changed from closed to reopened
I'm having the same issue. Not using that plug in. Any ideas?
#7
in reply to:
↑ 6
@
10 years ago
- Keywords needs-refresh reporter-feedback added
- Milestone set to Awaiting Review
Replying to ccwtech:
I'm having the same issue. Not using that plug in. Any ideas?
- Does it still happen with all plugins disabled and a default theme (Twenty Fourteen or Twenty Thirteen) activated?
- Are there any JavaScript errors in your browser?
This ticket was mentioned in IRC in #wordpress-dev by SergeyBiryukov. View the logs.
10 years ago
#10
@
10 years ago
- Resolution set to worksforme
- Status changed from reopened to closed
In this case it was this plugin for me. Disabling it fixed the issue.
Comprehensive Google Map Plugin
Activate | Edit | Delete
A simple and intuitive, yet elegant and fully documented Google map plugin that installs as a widget and a short code. The plugin is packed with useful features. Widget and shortcode enabled. Offers extensive configuration options for markers, over 250 custom marker icons, marker Geo mashup, controls, size, KML files, location by latitude/longitude, location by address, info window, directions, traffic/bike lanes and more.
Version 9.0.20 | By Alex Zagniotov | View details
#11
@
10 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
This is because plugins are depending on functionality in wp-admin/js/media.js, in which we're bootstrapping media grid.
We need a conditional check around the wp.media() call to ensure this only runs on the media grid page.
#12
@
10 years ago
- Keywords needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to 4.0.1
#13
follow-up:
↓ 15
@
10 years ago
- Keywords dev-feedback added
Not sure about the best approach here.
We need awareness in Javascript whether we're on the media grid page vs. any other page (including the Media list page).
A conditional like document.body.className.indexOf( 'upload-php' ) !== -1
comes to mind, but this is also returns true if we're on the Media list page.
#14
@
10 years ago
The Comprehensive Google Map plugin is also keep Yoast SEO per-page options from displaying correctly. This sounds like a seperate issue?
http://wordpress.org/support/topic/seo-options-not-there-since-40?replies=21#post-5981158
#15
in reply to:
↑ 13
@
10 years ago
Replying to ericlewis:
We need awareness in Javascript whether we're on the media grid page vs. any other page (including the Media list page).
As the media grid still uses <div class="wrap">
as the "main wrapper", we can easily add an ID to it from PHP and look for that from JS. Don't think it would need anything more complex.
#16
@
10 years ago
29520.patch works well here.
Not sure this is the only problem with these plugins though, looking further.
#17
@
10 years ago
- Keywords has-patch added; needs-patch dev-feedback removed
Don't see JS errors with the patch and the above plugin enabled.
#18
@
10 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from reopened to closed
In 29725:
#19
@
10 years ago
- Keywords commit fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 4.0.1.
#21
in reply to:
↑ description
@
10 years ago
I was seeing this on a clean install of 4.0 also. First off I turned off CONCATENATE_SCRIPTS in wp-config. This showed that there was a 403 accessing jquery. So it was my bad as I'm the maintainer of my site, but this is a pretty gnarly breakage in my case that was difficult to track down.
Does it still happen with all plugins disabled and a default theme (Twenty Fourteen or Twenty Thirteen) activated?