thefuxia / t5-libraries Goto Github PK
View Code? Open in Web Editor NEWLibrary of WordPress development classes.
Library of WordPress development classes.
When media uploads are enabled in the AJAX Editor, the upload button is visible, but clicking it raises just an error:
Uncaught exception: TypeError: Cannot convert 'n' to object
Error thrown at line 595, column 2 in <anonymous function: w.template>(n, t, r):
n.replace(u, function(t, r, e, u, o) {
called from line 27, column 3 in <anonymous function>(data):
compiled = compiled || _.template( $( '#tmpl-' + id ).html(), , options );
called from line 2939, column 3 in <anonymous function: css>():
media.view.Attachments.$head().append( this.cssTemplate({
called as bound function from line 2924, column 3 in <anonymous function: initialize>():
this.css();
called via Function.prototype.apply() from line 3521, column 3 in <anonymous function: initialize>():
return media.view.Attachments.prototype.initialize.apply( this, arguments );
called via Function.prototype.apply() from line 773, column 3 in <anonymous function: a.View>(t):
this.initialize.apply(this, arguments);
called via Function.prototype.apply() from line 347, column 3 in <anonymous function: constructor>():
Backbone.View.apply( this, arguments );
called via Function.prototype.apply() from line 880, column 3 in <anonymous function: constructor>(options):
wp.Backbone.View.apply( this, arguments );
called via Function.prototype.apply() from line 1121, column 5 in <anonymous function: r>():
return i.apply(this, arguments)
called via Function.prototype.apply() from line 1121, column 5 in <anonymous function: r>():
return i.apply(this, arguments)
To debug that, I have replaced the minified underscore.js
with an unminified version from the original repo (not included in WordPress core for no obvious reasons). The error is now:
Uncaught exception: TypeError: Cannot convert 'text' to object
Error thrown at line 1130, column 4 in <anonymous function: _.template>(text, data, settings):
text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
called from line 27, column 3 in <anonymous function>(data):
compiled = compiled || _.template( $( '#tmpl-' + id ).html(), , options );
called from line 2939, column 3 in <anonymous function: css>():
media.view.Attachments.$head().append( this.cssTemplate({
called as bound function from line 2924, column 3 in <anonymous function: initialize>():
this.css();
called via Function.prototype.apply() from line 3521, column 3 in <anonymous function: initialize>():
return media.view.Attachments.prototype.initialize.apply( this, arguments );
called via Function.prototype.apply() from line 773, column 3 in <anonymous function: a.View>(t):
this.initialize.apply(this, arguments);
called via Function.prototype.apply() from line 347, column 3 in <anonymous function: constructor>():
Backbone.View.apply( this, arguments );
called via Function.prototype.apply() from line 880, column 3 in <anonymous function: constructor>(options):
wp.Backbone.View.apply( this, arguments );
called via Function.prototype.apply() from line 1121, column 5 in <anonymous function: r>():
return i.apply(this, arguments)
called via Function.prototype.apply() from line 1121, column 5 in <anonymous function: r>():
return i.apply(this, arguments)
We could look into the file header of a plugin or theme and prevent auto-updates if there is a header
Auto-Update: true
A composer.json would be useful, the only part that may need investigation is tieing in the autoloader
return wp_verify_nonce( $_REQUEST[ $this->name ], $this->action );
@toscho
Don't you need to verify if $_REQUEST[ $this->name ]
is set?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.