Home › Forums › Calendar Products › Events Calendar PRO › Mini calendar widget causing wrong events to show on main calendar
- This topic has 14 replies, 4 voices, and was last updated 11 years, 9 months ago by
Leah.
-
AuthorPosts
-
February 12, 2014 at 9:41 am #103773
Jamie Johannsen
ParticipantI have a custom theme that I have The Events Calendar worked in to. We recently purchased pro to add the mini calendar to the sidebar on our events page on the site (list view is the default for the events page). When I add in the widget and switch to the month view on the main events page, it causes the events and dates on the main calendar to be stuck on the current month, even when I switch to a separate month (February’s dates and events are display when on January, December, etc.). If I remove the widget, the dates and events are updated appropriately when changing months. Any ideas? Direct link to the events section is:
February 12, 2014 at 1:11 pm #103830Jamie Johannsen
ParticipantI tested on 2013 and it is working appropriately, so I’m wondering what in my theme is causing the issue. Any assistance would be appreciated.
February 13, 2014 at 5:08 pm #104344Julie Kuehl
ParticipantHey jamie,
I’m so sorry that we haven’t lived up to our promised level of support for you. While there may be reasons, there’s really no excuse. I am going to assign this to one of our team members who will get back to you tomorrow. We really appreciate your patience and understanding.
– Julie
February 14, 2014 at 5:40 am #104439Brook
ParticipantHowdy jamie,
Like Julie said we are very sorry we were not able to get back to you in a timely manner. We do only guarantee a response within 48 hours, but usually it is nowhere near this close to the end of that window. We just have had a lot more traffic than usual.
It’s awesome that you are designing your own theme. That is no easy task. In looking at your theme I am noticing a couple of errors that will definitely cause some problems. For one thing, you have a duplicate body tag appearing above your content. Even the <html> and <head> tags are appearing inside of it! This confuses the browser.
Another issue is that your sidebar widget is not outputting the sidebar classes along with everything else. Here in the WP Codex it gives you a good example on how to create a sidebar widget area. Notice this line in particular:
'before_widget' => '<li id="%1$s" class="widget %2$s">',That %2$s is particularly important, as it will add the widget class to the container. Without it, widget scripts will not work very well.
Does this all make sense? Did it help you fix the problem? Please let me know! I definitely want to get this sorted.
– Brook
February 18, 2014 at 6:56 am #105882Jamie Johannsen
ParticipantBrook,
Thanks for the tips. I’ve cleaned up the issues you pointed out, but I’m still getting the same behavior: events/dates stagnant on the main calendar view; links on widget not working. Any additional help would be much appreciated.
February 18, 2014 at 7:06 am #105887Brook
ParticipantHowdy again Jamie,
There is still some browser confusion going on. You will see certain things that should appear inside of <head> appearing inside of <body>. Like the <title> tag for instance, and lots and lots of scripts/stylesheets. This is confusing the browsers as well, particularly regarding DOM events like window.load. You will need to make sure that everything that is supposed to go inside of <head> appears there, including the PHP call to wp_head().
I hope that makes sense. Let me know if I can further assist you with our plugin. Really the above stuff more has to do with understanding HTML fundamentals, not our plugin. But, if our plugin is one of the only or few things that uses JavaScript on your site, then it is one of the few areas those fundamental mishaps will cause visible problems. I hope the rest of the site goes smooth. Cheers!
– Brook
February 18, 2014 at 11:29 am #106097Jamie Johannsen
ParticipantThanks Brook. I’ve done some more cleanup, especially to the events area, and things seem to be in order for the most part(removed unnecessary javascript, stylesheets, etc.), but I’m still having the same issues. The template that this started off of was inherited, so I’ve had a lot of weird things that needed to be cleaned up in general; if there are glaring examples I’d appreciate your assistance.
As for the main issue though, for the events page, that is the ONLY thing using javascript, and based on how I’ve got my code structured, it should only be bringing in the WP based jquery libraries and the events calendar libraries on those pages. Here is how I’ve got the sidebar coded for the events pages:
register_sidebar( array(
‘name’ => ‘events_sidebar’,
‘id’ => ‘events_left’,
‘before_widget’ => ‘<div class=”col1contentitem”><div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div></div>’,
‘before_title’ => ”,
‘after_title’ => ”,
) );Is this correct based on your prior note?
What javascript is being called by the widget that isn’t being found in the loaded scripts? It almost seems like I’m missing a script that should be included or something. Or one of the scripts that IS being loaded is causing a malfunction elsewhere.
February 18, 2014 at 11:49 am #106106Brook
ParticipantYou are so very welcome!
Your script is for some reason not calling widget-calendar-full(.min).css, nor is it including widget-calendar.js. Is your theme even calling wp_head() anywhere? That is a pretty necessary bit of code for general WP plugin compatibility.
You should not actually need to manually insert/remove scripts, like jQuery. WordPress does this automatically using it’s enqueue_script system. Basically it will enqueue scripts and their dependents (which many plugins, ours included, depend upon jQuery) wherever WP is told it needs to. If it is not needed on a given page, it should not be included. If you have created your own version of the enqueue system it is pretty much guaranteed to conflict with plugins, ours included.
– Brook
February 18, 2014 at 11:50 am #106108Brook
ParticipantOoops, I forgot to add your register_sidebar code looks stellar. Good work!
February 19, 2014 at 6:29 am #106433Jamie Johannsen
Participantwp_head(); is the last call in my header file right before the closing tag for the <head>.
As for the enqueue, I rely on WP to do that, except for a few pages. There were a few items I found that I liked that weren’t wordpress plugins, so on those specific pages (none of which are on the events related pages) I include those scripts/stylesheets for use via php in the header file.
Is there something that should be triggering the include of the files you mentioned that I’ve somehow overridden without knowing?
February 19, 2014 at 1:48 pm #106636Jamie Johannsen
ParticipantBrook,
I’ve loaded the stylesheet manually and that resolved my issues with formatting for the widget. But still no go on the ajax functionality within the widget, even after explicitly including widget-calendar.js.
February 21, 2014 at 11:48 am #108061Jamie Johannsen
ParticipantBrook,
I was finally able to get this to work. I ended up manually loading those two files after doing some cleanup. I’ve got another issue happening now, but I’ll see if I can resolve that on my own before opening another thread.
February 21, 2014 at 2:48 pm #108094Brook
ParticipantJamie I am glad you got it sorted. Thank you for sharing the solution. It has been a pleasure helping you. Sorry I was not able to get back to you in time to help with the final problem. Definitely open up a new thread if you need assistance with something else. Cheers!
May 24, 2014 at 1:49 pm #173903Leah
MemberHi there,
I just wanted to update you here. We were not able to fix this issue in time for our upcoming release (3.6). However, it is still very much a priority and we hope to have it corrected in the next maintenance release. We will keep you posted on our progress. Thank you for your patience and support!
Best,
LeahJuly 17, 2014 at 5:15 pm #433782Leah
MemberHi there,
I just wanted to drop in and update you on the status of this issue. We are working on the upcoming 3.7 release and are happy to say that a fix for this issue will be included. Please keep an eye on your Updates and Plugins pages for an update prompt. If you have any trouble or continue to see this issue after updating, please start a new thread and we can assist you from there. Thank you for your patience while we worked on this issue.
Best,
Leah -
AuthorPosts
- The topic ‘Mini calendar widget causing wrong events to show on main calendar’ is closed to new replies.
