Event Organiser
[resolved] Event Organiser - Next and Prev Month Links not working in Sidebar (19 posts)

  1. Filespit
    Posted 3 years ago #

    Hi there. I am using the Event Organiser plugin and I have the following problem. On my front page the widget works perfectly fine, I can click the Next and Previous month links and it loads just like it's supposed to, and I can then click the dates and view the events.

    When you click on an event, you're sent to a different-looking page. On this very page, I have the same widget in my Sidebar. However, the month links doesn't work here. When I click either next or previous I am sent back to the front page. Why does this happen? Help would be much appreciated!

    This is the front page of my site, where the widget works;

    And this is the sub-page that also has the widget, where the month links doesn't work;


  2. Stephen Harris
    Posted 3 years ago #

    Hi Filespit,

    I get the following JavaScript errors in my console:

    GET http://wptest.traineehalland.se/schema-program/script/jquery.js 404 (Not Found) /schema-program/:24
    GET http://wptest.traineehalland.se/schema-program/global.js 404 (Not Found)

    It seems jQuery isn't loading, hence the calendar navigation doesn't work.

    It seems you using a relative url to find jQuery / globa.js:

    <script type="text/javascript" src="script/jquery.js"></script>

    Hence it doesn't find it on a sub-page. (You seem to be loading jQuery twice too, which can cause problems) - once from WordPress and once using the above.

  3. Filespit
    Posted 3 years ago #

    Hello Stephen,

    Thank you for answering. I've looked into it and that does seem to be the problem. I tried hardcoding the url so it searches directly for the jquery and global files. It works for the front page but not the sub-page.

    <script type="text/javascript" src="http://wptest.traineehalland.se/wp-content/themes/traineehalland/script/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="http://wptest.traineehalland.se/wp-content/themes/traineehalland/global.js"></script>

    What should I do here? Does it matter if the widget is placed in the sidebar? It's placed there by default after all. If jquery is loaded twice, how do you prevent that?

  4. Stephen Harris
    Posted 3 years ago #

    mmm... still can't be found - it's still using a relative url for me.

    In any case, you should probably remove the jquery call. You can load javascript by using wp_enqueue_script('jquery') whenever you need it (or in your header if you wanted loaded on every page).

    You should also register and enqueue your global.js script via the WordPress API (see Codex for details)

  5. Filespit
    Posted 3 years ago #

    I've removed the hardcoding for jquery and I'm using the wp_jquery_script instead. I also added this to register the global file. Still not loading on the sub-page though.

    <?php wp_enqueue_script('jquery', $src='http://wptest.traineehalland.se/wp-content/themes/traineehalland/global.js'); ?>

  6. Stephen Harris
    Posted 3 years ago #

    That has stopped the errors. But the bug persists...

    I've just noticed that you are you using a shortcode on the main page, and a widget on the sub-page. Could you provide the code where you register the widget? It should be a call to register_sidebar() somewhere in your theme's functions.php

  7. Stephen Harris
    Posted 3 years ago #

    Looking at the calendar a bit closer, I'm almost certain this is the case.

    The register_sidebar() should be of the form:

      'name' => __( 'Side bar name' ),
      'id' => 'sidebar-id',
      'description' => __( 'Widget area description' ),
      'before_title' => '<h1>',
      'after_title' => '</h1>',
      'before_widget' => '<div id="%1$s" class="widget %2$s">',
      'after_widget' => '</div>',

    Note the %1$s and %2$s in the before_widget argument - these are necessary for the calendar to function correctly. It seems you are missing the %2$s.

  8. Filespit
    Posted 3 years ago #

    Thanks again for answering. I have a new problem now that maybe you could help me with. I just installed WordPress on the www-adress, the link I posted above is my subdomain. I uploaded my theme with the same files, but the widget isn't showing at all in the sidebar. Instead it lists my recent posts.

    I have tried replacing codes in sidebar.php, functions.php and archive-event.php, but I can't get the sidebar to show the widget. What am I doing wrong here?

    Update: I just solved it. I had to add it to the sidebar under widgets in the admin panel. Now I'm back where I started this thread, I can't browse the calendar.

  9. Stephen Harris
    Posted 3 years ago #

    Have you tried the code above - looking at the links above, it still doesn't appear to be using '<div id="%1$s" class="widget %2$s">' for the before_widget argument...

  10. Filespit
    Posted 3 years ago #

    Hi Stephen! I finally got it to work! It was indeed that code that was missing, thanks for helping me out!

    New question though; when I click a date in a month, the page loads and resets the calendar to the current month, which in this case is september. Say I click a date in april 2013, then I want the calendar to stay in april when the page reloads, and not reset to september 2012. Is that possible?

  11. Stephen Harris
    Posted 3 years ago #

    This has been request before, I think in the next update I will change it so it does this...

  12. andyruw
    Posted 3 years ago #

    Hi Stephen. Sorry for re-opening this. I'm having the same issue with the prev & next month links.

    The functions.php file has the code you mentioned above with the register-sidebars function, so I wondered if you've got any ideas why i'm having the problem?

    I'm getting this message in the console;

    'Uncaught TypeError: Object [object Object] has no method 'off' '

    The site is http://www.mycommunitychurch.org.uk/community/community-events/

    Love the plugin by the way, I just need to sort out this small issue.


  13. Stephen Harris
    Plugin Author

    Posted 3 years ago #

    Hi Andy,

    The site is using an out of date jQuery (1.6.4) - the plug-in requires 1.7+, since I think 1.9 will be included in WP 3.6 and that removes some functions (and their replacement was added in 1.7).

    It seems a plug-in/theme is replacing the WordPress shipped version (which is kept relatively up to date) with Google hosted jQuery.

    Chuffed to see a New Frontiers church using my plug-in :).

  14. andyruw
    Posted 3 years ago #

    Thanks for the reply. Yeah, we have a few churches that your plugin is perfect for.

    This is a theme that i've built from a blank one. Is it possible to overide the out of date jQuery version in the theme's header.php? (I think a plugin is causing the problem).

  15. Stephen Harris
    Plugin Author

    Posted 3 years ago #

    You'll need to find which plug-in is doing it, and then prevent it (you can do this without editing the plug-in). I would also contact the plug-in author and ask them to fix this. Plug-ins should not be doing that, unless you're using a plug-in whose explicit purpose is to replace the shipped jQuery with the Google hosted one.

    If you have any 'performance' related plug-ins they might be responsible.

    To find the plug-in do a grep search for 'http://ajax.googleapis.com/ajax/libs/jquery/' - that should hopefully identify it.

    If the plug-in is hosted here on the repo then let me know - since plugins are moderated and they'll want this fixed. If its hosted elsewhere then you'll have to ask them to fix it / use another plug-in.

    Alternatively you could just use an old stable version of EO (1.8.4 might be ok) that doesn't require jQuery 1.7+.

  16. andyruw
    Posted 3 years ago #

    Thanks Stephen. I found the plugin causing the issue.


    At the moment I edited the plugin (not ideal). Is there a way to prevent it rather than editing it?

  17. Stephen Harris
    Plugin Author

    Posted 3 years ago #

    The one with 3-12, works:broken ratio? :)

    The following should work

    add_action('init', 'remove_the_image_slider_head_scripts', 20);
    function remove_the_image_slider_head_scripts(){
         remove_action('wp_print_scripts', "thethe_image_slider_head_scripts");
  18. andyruw
    Posted 3 years ago #

    ha ha. 3.12... make that 3-13!! ;)

    Thanks for your help. That's good now.

  19. davotoo
    Posted 3 years ago #


    I am having same issue with latest version of WordPress, DirectoryPress Theme version 7.1.3 & EO Version 2.0.2. Using Google Chrome browser.

    Not sure where you are looking to find the error messages mentioned above but I don't seem to get any so don't know where to start troubleshooting!

    Website http://www.myjamii.com operating from Tanzania :)

    Any assistance for a novice greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic