Opened 23 months ago
Closed 16 months ago
#53856 closed defect (bug) (fixed)
Check if the 'mirroring' property exists in media-views.js
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch commit |
Focuses: | javascript, administration | Cc: |
Description
/wp-includes/js/media-views.js
<?php this.collection.mirroring.args.s
on line 2121 should be
<?php if ( this.collection.hasOwnProperty('mirroring') && this.collection.mirroring.args.s ){
Similar issue
/wp-includes/js/media-views.min.js
Attachments (1)
Change History (20)
This ticket was mentioned in PR #1537 on WordPress/wordpress-develop by mukeshpanchal27.
23 months ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/53856
#3
@
23 months ago
- Component changed from General to Media
- Focuses coding-standards removed
- Version 5.8 deleted
Hi there!
@MMDeveloper thanks for the ticket.
media-views.js
and media-views.min.js
is automated build files.
PR added as per your suggestion.
#4
@
23 months ago
- Summary changed from Small Bug to Check if the 'mirroring' property exists in media-views.js
#5
@
23 months ago
- Keywords reporter-feedback added
@mukesh27 @MMDeveloper How can this bug be reproduced please?
#6
@
23 months ago
I think its to do with legacy software. I'm on WordPress 5.8 but the theme has not been updated in many years. So you may not necessarily care. On WordPress Visual editor, I click edit gallery and when I see WordPress Media Gallery, it produces this error in the Google Developer Tools console.
I think it could be a legacy issue, but considering its just checking if a variable exists or not, I didn't think it was a big deal for you guys to implement in next build.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
19 months ago
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
19 months ago
#12
@
19 months ago
- Milestone changed from 6.0 to 5.9
Joe mentioned this was a good candidate to make it back into the 5.9 milestone so we'll be moving it back in. :D Thanks, Joe!
#13
@
19 months ago
- Keywords needs-testing-info needs-testing added
- Milestone changed from 5.9 to 6.0
5.9 Beta 1 is happening in less than 30 minutes. I'm sorry this ticket didn't get a review and testing in time. As it's a bug that was not introduced in 5.9 cycle, moving it to 6.0 to give it the time and attention it deserves.
Also updated the keywords as testing instructions are needed to reproduce the issue and then verify the patch resolves it.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
17 months ago
#16
@
16 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Is there a reason not to just check if ( this.collection.mirroring && ... )
here?
Seems more consistent with seven similar checks in models/attachments.js, and I think it doesn't matter in this case if the property is directly assigned or inherited, just that it exists.
#53857 was marked as a duplicate.