2016-04-14 22 views
2

Bu, konsoldan bir hatayla gelen koddur. i herhangi bir kural kırık ya da yeterince sorunu ayrıntılarıyla izah değil eğer WordPress'te Visual Composer hatası, WP'ye güncelledikten sonra 4.5

/** 
    * Convert html into correct element 
    * @param html 
    */ 
    html2element:function (html) { 
     var attributes = {}, 
      $template; 
     if (_.isString(html)) { 
      this.template = _.template(html); 
      $template = $(this.template(this.model.toJSON()).trim()); 
     } else { 
      this.template = html; 
      $template = html; 
     } 
     _.each($template.get(0).attributes, function (attr) { 
      attributes[attr.name] = attr.value; 
     }); 
     this.$el.attr(attributes).html($template.html()); 
     this.setContent(); 
     this.renderContent(); 
    }, 

it causes the page editor not to load!

see the line where there is an error in the code.

peşinen özür dilerim.

Lütfen mümkünse tavsiyede bulunun.

+1

http://stackoverflow.com/questions/36605420/plugin-throwing-typeerror-after-wordpress-4-5-update - ayrıca, bu PHP değil yani etiketlerinizi izleyin, bu JavaScript – KDOT

+0

Hata olabilir temanızla da alakalı. Hangi temayı kullanıyorsunuz? –

+0

Aşağıda belirtilen çözümler benim durumumda yardımcı olmadı. Çözümüm: Visual Composer eklentisinin (4.5.3) birlikte verilen yüklemesini silin, ticari sürümü (sürüm 5, Maliyet: $ 35) satın alın ve bunun yerine yükleyin. –

cevap

1

Lütfen cevabıma bakın here.

ben html2element fonksiyonunu güncelleyerek bu hata düzeltildi:

html2element: function(html) { 
     var $template, attributes = {}, 
      template = html; 
     $template = $(template(this.model.toJSON()).trim()), _.each($template.get(0).attributes, function(attr) { 
      attributes[attr.name] = attr.value 
     }), this.$el.attr(attributes).html($template.html()), this.setContent(), this.renderContent() 
    }, 

Umut

/wp-content/plugins/js_composer/assets/js/backend/composer-view.js bu sizin için çalışıyor!

+0

Buna bakmak için zaman ayırdığınız için teşekkürler! , sorunun temanın geçmişte kaldığını görüyor, dolayısıyla çözümünüzü denemedim! –

+0

Ben, çözümünüz benim için mükemmel çalıştı! Teşekkürler. – Senya

İlgili konular