Is this when in the admin, or on the frontend?
Have you set up any fields with CMB2 at that point, or is it literally just active and that’s it?
This is on the front end.
There are fields set up, but not being used on that page. All the fields are in a .php file in the theme. But, like I said, this issue occurs in the default WP 2020 theme which has no cmb2 fields set up.
-
This reply was modified 5 years, 6 months ago by
cranewest.
Any link that we can visit to see things? I’m curious if there’s some sort of js error going on.
Thank you for your help on this.
This is the site: http://cwpreview.com/grahamtexas/events/ Currently running in the custom theme and all plugins active. I don’t see any JS errors.
I can reproduce the issue in my development server so it’s not something specific to one server. However, in a completely clean WP install everything works fine:
http://cwpreview.com/test/events/
So it may not be a conflict with the plugins after all.
Just went to the first link, and I see “list”, “month”, and “day” in the upper right and they’re letting me switch between them. Maybe slightly slow at times as it fetches the content, but only a few seconds. Nothing like 10sec+ or so.
Is that what I should be clicking on to recreate the issue?
Just click on an event. Instead of the event details, it just shows the list view.
I found if I comment out do_action( ‘cmb2_init’ ); on line 34 in bootstrap.php the events links work like they’re supposed to.
ahh
Not sure what’s going on with that, since CMB2 doesn’t have any scripts that we load on the frontend, and until it’s actually configured to do something, it really just sits there. It’s technically a library packaged up as a plugin for easy enough loading.
So, it feels like there’s something going on with Event Calendar’s queries in some way causing it to just return the same view, the question is what and why, and I don’t have any great pointers for you at the moment.
removing the cmb2_init hook basically renders CMB2 as not usable on the frontend. Any sort of php/server side errors that may be getting found would be the most useful here, it may not just be js.
So it turns out I have a custom query in a mu-plugin that builds a hierarchical page list in an admin options page for a custom post type and uses CMB2 to save the options. For some reason that was being called on the front-end. I added an is_admin() check and everything is working fine now. Thank you for your help!
-
This reply was modified 5 years, 6 months ago by
cranewest.
you could also probably use the cmb2_admin_init hook which would only run in admin.
Regardless, glad to hear things were found and everything works again.