[wp-trac] [WordPress Trac] #39615: The JS Bootstrapping For Media Handling Breaks Due To Validation Service
WordPress Trac
noreply at wordpress.org
Sun Jan 29 07:23:44 UTC 2017
#39615: The JS Bootstrapping For Media Handling Breaks Due To Validation Service
-------------------------------+------------------------------
Reporter: rjc430404 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.7.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by rogerlos):
FWIW, the code block above
{{{
wp.Uploader && ValidationService.isEmpty().value() &&
this.observe(wp.Uploader.queue)},
}}}
is in /wp-includes/js/media-models.min.js at column 11044 (version 4.7.1),
though not verbatim (spaces added to wrap nicely):
{{{
wp.Uploader && _(this.args).chain().keys().difference(c).isEmpty().value()
&& this.observe(wp.Uploader.queue)},
}}}
I know nothing of how core concatenates, substitutes or otherwise allows
other plugins to insert values here, but I assume what @rjc430404 has
encountered is either because the WP core code can be filtered to allow
the insertion of something like "ValidationService" or because something
naughty has happened to the install.
The unminified code is at line 1169 of /wp-includes/js/media-models.js:
{{{
// Observe the central `wp.Uploader.queue` collection to watch for
// new matches for the query.
//
// Only observe when a limited number of query args are set. There
// are no filters for other properties, so observing will result in
// false positives in those queries.
allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type',
'post_parent' ];
if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed
).isEmpty().value() ) {
this.observe( wp.Uploader.queue );
}
}}}
Again, not an expert at all, but a quick google shows the vast majority of
"ValidationService" hits being related to angular.js. Is there a chance
your theme or server are running angular?
My itchy spot says this seems like a hosting or machine-specific install
of WP which is doing some undoubtedly lovely angular stuff.
Please delete me if I'm barking up the wrong tree here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39615#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list