• Resolved bibberle

    (@bibberle)


    Hello,

    unfortunally, my site throws an javascript error when viewing logs, so I cannot filter these. The error is:

    caught Error: No select2/compat/initSelection
    at D (select2.js?ver=4.0.13:2:1364)
    at s (select2.js?ver=4.0.13:2:2743)
    at select2.js?ver=4.0.13:2:1202
    at n.apply (select2.js?ver=4.0.13:2:53444)
    at new e (select2.js?ver=4.0.13:2:57220)
    at new d (select2.js?ver=4.0.13:2:59399)
    at HTMLSelectElement. (select2.js?ver=4.0.13:2:68932)
    at Function.each (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.2:2:3003)
    at e..each (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.2:2:1481)
    at i.fn.select2 (select2.js?ver=4.0.13:2:68892)
    D

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pär Thernström

    (@eskapism)

    Probably some incompability issue with another plugins. Any chance you could list the plugins you have active?

    Thread Starter bibberle

    (@bibberle)

    Solved the issue by enqueuing select2 with another slug like “select2v4”

    Plugin Author Pär Thernström

    (@eskapism)

    Thanks for posting the solution! I will “namespace” select2 or use another library in the future to avoid issues like this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Javascript Error regarding Select2’ is closed to new replies.