Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

218
Vistas
Wordpress WP Media is not working - this.options is undefined

I'm using wp media to upload image using Javascript.

JS Part is here -

handleLogoUpload () {
  var self = this;

  // If the media frame already exists, reopen it.
  if ( this.wpmedia ) {
      this.wpmedia.open();
      return;
  }

  // Create a new media frame
  this.wpmedia = wp.media({
     title: __( 'Select or Upload Media Of Your Chosen Persuasion' ),
     button: {
        text: __( 'Use this media' )
     },
     type : 'image',
     multiple: false
  });

  this.wpmedia.on( 'select', function() {
       // Handle this in my way
  });

  this.wpmedia.open();
},

I've also enqueued the Media library in PHP end.

But when, I just choose an image from Local directory to Upload Getting this error -

Uncaught TypeError: this.options is undefined createAttachmentView http://wpex.test/wp-includes/js/media-views.js?ver=5.9.2:9336

Error Demo in Console

It seems error in media-views.js.

Is there anyone have faced this before.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda