Mini calendar widget causing wrong events to show on main calendar

Home Forums Calendar Products Events Calendar PRO Mini calendar widget causing wrong events to show on main calendar

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #103773
    Jamie Johannsen
    Participant

    I 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:

    http://test.wcfpd.org/events

    #103830
    Jamie Johannsen
    Participant

    I 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.

    #104344
    Julie Kuehl
    Participant

    Hey 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

    #104439
    Brook
    Participant

    Howdy 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

    #105882
    Jamie Johannsen
    Participant

    Brook,

    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.

    #105887
    Brook
    Participant

    Howdy 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

    #106097
    Jamie Johannsen
    Participant

    Thanks 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.

    #106106
    Brook
    Participant

    You 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

    #106108
    Brook
    Participant

    Ooops, I forgot to add your register_sidebar code looks stellar. Good work!

    #106433
    Jamie Johannsen
    Participant

    wp_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?

    #106636
    Jamie Johannsen
    Participant

    Brook,

    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.

    #108061
    Jamie Johannsen
    Participant

    Brook,

    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.

    #108094
    Brook
    Participant

    Jamie 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!

    #173903
    Leah
    Member

    Hi 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,
    Leah

    #433782
    Leah
    Member

    Hi 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

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Mini calendar widget causing wrong events to show on main calendar’ is closed to new replies.