Datepicker missing theme
-
I think this may be related to WordPress 6.5 but I’m not sure. It was working and I updated to WordPress 6.5.2 a couple of days ago. Now it is broken.
The stylesheet used on the datepicker field is not getting included because it is trying to load https://code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.min.css?ver=1.9.2.
In the file /wp-job-manager/includes/class-wp-job-manager.php on line 290 there is a function that sets the version of jQuery UI and enqueues the style and script for the datepicker. But it is getting called too early. On line 109 you register an action hook:
add_action( 'wp_loaded', [ $this, 'register_shared_assets' ] );Since you are enqueuing a style and script you should use the wp_enqueue_scripts and admin_enqueue_scripts action hooks instead. When the wp_loaded hook is called the global $wp_scripts variable is empty and the jQuery UI version is set to the default you have in the code which is 1.9.2 and that version no longer exists on code.jquery.com.
The topic ‘Datepicker missing theme’ is closed to new replies.