Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Select2 Error Woocommerce

woocommerce
    • 8 years, 6 months ago brettmuscio
      Participant

      Expired

      Hi There,

      We’re having a problem where the Select2 built in to the theme files is causing errors with plugins which use the newer Select2 version built in to Woocommerce.  Is there a way I can force the site to use the Woocommerce Select2 for even a specific page?

      See console output below:

      jquery-migrate.min.js?ver=1.4.1:2 JQMIGRATE: Migrate is installed, version 1.4.1

      select2.min.js?ver=1:1 Uncaught Error: Option ‘ajax’ is not allowed for Select2 when attached to a <select> element.

      at String.<anonymous> (select2.min.js?ver=1:1)

      at Function.each (jquery.js?ver=1.12.4:2)

      at r.prepareOpts (select2.min.js?ver=1:1)

      at r.prepareOpts (select2.min.js?ver=1:1)

      at r.init (select2.min.js?ver=1:1)

      at HTMLSelectElement.<anonymous> (select2.min.js?ver=1:1)

      at Function.each (jquery.js?ver=1.12.4:2)

      at a.fn.init.each (jquery.js?ver=1.12.4:2)

      at a.fn.init.e.fn.select2 (select2.min.js?ver=1:1)

      at HTMLSelectElement.<anonymous> (ignitewoo-opc.js?ver=1500423599:742)

      select2.png Failed to load resource: the server responded with a status of 404 ()

    • 8 years, 5 months ago Mirela
      Participant

      Hello,

      What plugins do you have installed? Can i see a link of the site?

      To remove a script from being called from a page, add this code into page.php file:

      $page_id = get_the_ID();
      if($page_id == 10){ wp_dequeue_script('select2'); }

      Change the page id (in this case 10) to the page’s id you want this script removed for.
      Let us know.

      Best regards!

      • This reply was modified 8 years, 5 months ago by Mirela.
    • 8 years, 5 months ago brettmuscio
      Participant

      Expired

      This reply has been marked as private.
    • 8 years, 5 months ago Mirela
      Participant

      Hello,

      The code in my last reply is what you need to add in order to stop a script from being called in a page. Replace the page id with your page’s id. Which in your case is ‘4578’. See screenshot.
      So the code would become like this:

      $page_id = get_the_ID();
      if($page_id == 4578){ wp_dequeue_script('select2'); }

      See here an example of the page.php file with this code added:
      https://codeshare.io/5DP7dW
      You can find file page.php directly under ‘specular‘ theme folder, or in Appearances > Editor, in the listed files at the right sidebar.

      Please know that we do not support third party plugins. The two plugins you are using have not been tested with theme (it’s impossible to do so with all plugins available) and script incompatibility is possible to happen.

      Best regards!

Viewing 3 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password