Site logo

Archived topic

Can't edit or create Elements, select2 is not a function in metabox.js

7 replies · Started by Peter on January 27, 2021

Viewing posts 1–8 of 8

Hi, I'm new to GeneratePress and just started exploring the functions. In Elements edit view I can't switch between panels as metabox.js throws an error: Uncaught TypeError: $(...).select2 is not a function. I have loaded the Catalyst site to experiment with, all plugins, but the GP ones, deactivated.

Yes, I read that before I posted and checked the ssl. Everything is clean, and https i forced in .htaccess. Seems strange that it should be affecting this, all calls are over https, none is failing. The site is a Duplicator install, I'll delete it and do a clean install from scratch.

Ok, I got it working. In the process I deleted the current site, did a clean install with only GP components. Still the same error :( Well, I refreshed the ssl, again, and suddenly; it's working! Reinstalled the backed up site from zip and it's still working! Success! Strange error though, you might want to have a look at that.

Spoke too soon :( the error is back.

Hi there,

are there any errors in the developers console ( Right Click > Inspect ) when inside the Element?

Hi,
I went back to the clean install, where Elements worked, and installed my usual plugins, one by one, and tested between every plugin. Now I'm finished and everything works as expected :) So I did not find out what the cause was.

The error was "Uncaught TypeError: $(…).select2 is not a function" in metabox.js
https://imgur.com/a/MSElL4C

Looks like jQuery migrate didn't like the function. Odd one though.
Glad to hear its now working.

This archived topic is closed to new replies.