• Hi thanks for developing this plugin. I’m a developer and trying to install on a custom theme I built, I’ve never used this plugin before.

    I get the following JS Error on the Edit Post screen:

    Uncaught query function not defined for Select2 s2id__schema_product_availability
    select2.min.js?ver=3.5.2:21

    Clicking any of the buttons in the plugins metabox applies a hash to the url but nothing else (no additional errors)

    Thanks
    WP 4.5
    Plugin 1.2

    https://www.ads-software.com/plugins/wp-seo-structured-data-schema/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am getting the same error:

    Uncaught query function not defined for Select2 s2id__schema_product_availability

    If i turn off the Advanced Custom Fields plugin, the Schema tabs function normally. To the best of my knowledge, this plugin was compatible with ACF up until the update around 4/25/2016.

    Everrrettt, are you using ACF as well?

    I’m looking through the plugin to see if I can find the source of the conflict and look for possible solutions. I’ll post any updates I find.

    ***UPDATE***

    I was able to resolve the conflict:

    File Path:
    /wp-seo-structured-data-schema/assets/js/admin.js

    Starting at line 10, I added select to the jquery selector. So it went from this:

    $(".select2").select2({
            placeholder: "Select an item",
            theme: "classic",
            dropdownAutoWidth : true
        });
    
        $(".field-content .select2").select2({
            theme: "classic",
            dropdownAutoWidth : true,
            width: '100%'
        });

    To this:

    $("select.select2").select2({
            placeholder: "Select an item",
            theme: "classic",
            dropdownAutoWidth : true
        });
    
        $(".field-content select.select2").select2({
            theme: "classic",
            dropdownAutoWidth : true,
            width: '100%'
        });

    I’m sure there is a more elegant solution, but this at least resolved this conflict for the present. I tried added a class of kcseo_select2 to the <select> output in the KcSeoSchemaModel.php file, but wasn’t able to call it properly. I’m sure the developer can implement this solution (or a better one).

    Plugin Author kcseopro

    (@kcseopro)

    Thanks for the details on this, we are looking into this issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JS Error / broken buttons on edit post screen (v 1.2)’ is closed to new replies.