WordPress.org

Forums

My Calendar
[resolved] [my calendar] Next/previous links do not work on mini calendar widget (8 posts)

  1. Dr_jAcKaSS
    Member
    Posted 2 years ago #

    Hi!

    Next/previous months links do not work on Mini calendar widget. After clicking on link it says "loading..." but the same month appears.

    I'm using the following code in my WP theme:
    < ?php echo do_shortcode('[my_calendar format="mini" showkey="yes" shownav="yes"]'); ? >

    The same functionality works perfectly in the full size calendar used on page.

    I'm using My Calendar version 1.10.12.

    http://wordpress.org/extend/plugins/my-calendar/

  2. Joe Dolson
    Member
    Plugin Author

    Posted 2 years ago #

    I'll check that out. I'm just wrapping up on version 1.11.0, so if this is a bug I'll try and get it covered in that version.

  3. Joe Dolson
    Member
    Plugin Author

    Posted 2 years ago #

    I haven't been able to reproduce this - can you point me to your installation where this doesn't work, so I can check it out specifically?

  4. Dr_jAcKaSS
    Member
    Posted 2 years ago #

    I have further tracked the behaviour...

    The URL of the page where I'm trying to use the mini calendar looks like: http://www.mywebsite.com/&page_id=10

    Links for next/previous are in format:
    http://www.mywebsite.com/?yr=2012&month=6&dy=&cid=all

    There is no page_id variable in the link. Which is rather strange.

    So, if I add manually to the link "&page_id=10" (page id of home page), it works as it should.

    I have also put mini calendar on some other page and it works - there is page_id in the link.

    What could disturb the calendar to not to add the page_id variable to the link?

  5. Dr_jAcKaSS
    Member
    Posted 2 years ago #

    I appologize... Joe thank you for your fast response!

  6. Joe Dolson
    Member
    Plugin Author

    Posted 2 years ago #

    That's very odd. page_id should certainly not be filtered from the URL; and it's doubly strange that it isn't filtered on some other instances of My Calendar (mini calendar uses the same code; it's just an alternate view of the standard calendar.)

    My test installation has the same style of links; and it's no problem there.

    You could try switching your permalinks to an alternate format - that would pretty certainly fix the problem, although I can understand if you're hesitant to change your permalink format.

    I suggest submitting a support request from the Help page; that would give me some additional information that may help.

  7. Dr_jAcKaSS
    Member
    Posted 2 years ago #

    Ok, finally I have figured out what is causing the page_id dissapearing from the link.

    It is the query_posts(...) call.

    For the page where I am trying to use mini calendar I have set a template page. In that template I have 2 query_posts() calls. If I remove both, the link includes page_id variable.

    I have also tried puting mini calendar short code before the query_posts() call and after it and the first one works as it should, while the second one is having described issue.

    So, to solve this I have to make those two query_posts() calls somehow differently.

  8. Dr_jAcKaSS
    Member
    Posted 2 years ago #

    Finally it was all my mistake. I forgot to add wp_reset_query(); after each query_posts() call.

    Anyway you may consider including this in to the faq, since WP default template is not calling wp_reset_query(); after The Loop, meaning this short code will probably not work even on simple template with only oe query_posts() call.

    Hope this will help anyone having similar issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • My Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.