Events Calenar year 2013 bug

Home Forums Calendar Products Events Calendar PRO Events Calenar year 2013 bug

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #30746
    Crosby
    Participant

    I need some help with a script I wrote last year and now seems it no longer works because of 2013. Let me explain.

    Going to this url the script works fine, it says No scheduled events:
    http://www.shopwaughchapel.com/events-widget/?month=03&year=2012&getAll=true

    Going to this url:
    http://www.shopwaughchapel.com/events-widget/?month=03&year=2013&getAll=true

    I get the 404 page. For some reason when i change the year it totally breaks. I’m using the latest version of The Events Calendar. I am not using PRO on this site. We own licenses for PRO but on this site it was not needed. Will upgrading to PRO fix this issue?

    Currently i have this same script running on 3 websites so i would like to have it fixed asap.

    #30750
    Crosby
    Participant

    To offer some more information i have enabled WP_DEBUG and installed the DEbug bar.

    Here is what it is telling me:

    WARNING: wp-includes/functions.php:924 – Cannot modify header information – headers already sent by (output started at wp-includes/functions.php:2758)
    WARNING: wp-includes/functions.php:3523 – Cannot modify header information – headers already sent by (output started at wp-includes/functions.php:2758)
    WARNING: wp-admin/admin-header.php:9 – Cannot modify header information – headers already sent by (output started at wp-includes/functions.php:2758)
    NOTICE: wp-content/plugins/wp-login/wp-login.php:63 – Undefined index: authorized
    NOTICE: wp-content/plugins/role-scoper/definitions_cr.php:412 – Undefined property: stdClass::$create_posts
    NOTICE: wp-content/plugins/role-scoper/definitions_cr.php:424 – Undefined property: stdClass::$create_posts
    NOTICE: wp-content/plugins/role-scoper/definitions_cr.php:436 – Undefined property: stdClass::$create_posts
    NOTICE: wp-content/plugins/role-scoper/definitions_cr.php:455 – Undefined property: stdClass::$create_posts

    I’m not seeing anything related to the event calendar, so I’m scratching my head trying to figure out why this is not working.

    #30751
    Barry
    Member

    Hi Crosby,

    Sorry to hear that you are experiencing problems here. Can you clarify, is this a custom script you wrote yourself – and does everything work as expected with The Events Calendar otherwise? If so we can certainly take a look (if you will share the custom code and explain a little about what you are trying to achieve) but can’t make any guarantees.

    Also, I see you noted that you are using 2.0.10 when you opened this thread but it looks to me like 2.0.8 is the version actually installed. Can you confirm if that’s the case?

    Thanks,

    Barry

    #30753
    Crosby
    Participant

    I got my wires crossed with the version numbers. I have 3 websites all using the same script. One site is running v2.0.8 and the other is running the latest. I’m having the same problem on both websites though.

    I’ll give you some more details about what the script does.

    On this page: http://www.shopwaughchapel.com/ you’ll find a box in the left column of the page titles Upcoming Events. You’ll see the loading icon never really disappears it just keeps loading. It’s because its trying to connect to this url: http://www.shopwaughchapel.com/events-widget/?month=03&year=2013&getAll=true — its not getting the response its looking for.

    I’m using a jQuery.get on a wordpress template that should return all of the events in a given month and year and then load them into that Upcoming Events box.

    Here is the code for the widget that loads the events:

    ‘all’,
    ‘posts_per_page’=>-1,
    ‘start_date’=>’01 ‘.$current_month.’ ‘.$current_year,
    ‘end_date’=>’31 ‘.$current_month.’ ‘.$current_year
    ));

    if( empty($all_events) ) {
    echo ‘No scheduled events.’;
    } else {
    foreach($all_events as $post) {
    setup_postdata($post);
    ?>
    <div class="”>
    <a href="”>
    <a href="”>ID, true, ‘M j, Y’); ?> – ID, true, ‘M j, Y’); ?>

    #30755
    Crosby
    Participant

    Let me try to paste my code again


    'all',
    'posts_per_page'=>-1,
    'start_date'=>'01 '.$current_month.' '.$current_year,
    'end_date'=>'31 '.$current_month.' '.$current_year
    ));

    if( empty($all_events) ) {
    echo 'No scheduled events.';
    } else {
    foreach($all_events as $post) {
    setup_postdata($post);
    ?>
    <div class="">
    <a href="">
    <a href="">ID, true, 'M j, Y'); ?> - ID, true, 'M j, Y'); ?>

    #30756
    Crosby
    Participant

    eh sorry about that, i’ve posted my code here in a flat text file:

    http://hv.crosbydev.com/Source/event-widget.txt

    #30757
    Barry
    Member

    Can you use a service like Gist or Pastebin, then link to your code that way? Unfortunately this forum doesn’t handle code nicely.

    #30758
    Barry
    Member

    OK! Posted at the same time there. Let me take a look.

    #30760
    Crosby
    Participant

    Here is the code that I have in my sidebar-leftmenu.php file.
    http://hv.crosbydev.com/Source/sidebar-leftmenu.txt

    Those two scripts work together to make the events appear in the sidebar and load them in dynamically filtered by month and year.

    #30766
    Crosby
    Participant

    Some more info, our site is hosted at Rackspace on a cloud site running PHP 5.3.14.

    Also bizarre, but i can get it to load my results for 2013 if i change the ampersands from & to & in the url. However, I’m not sure how i can do that in the script i wrote because i am a jquery.get command to build the url I’m pulling the data from.

    See:
    http://hv.crosbydev.com/events-widget/?month=01&year=2013&getAll=true

    Pretty odd.

    #30768
    Crosby
    Participant

    actually you’ll have to manually change the & to & in the url yourself, i guess i can’t post that either here. 🙂

    Thanks for you help BTW!

    #30771
    Barry
    Member

    So possibly a clash with query variables that are already reserved. Can you try making a few changes so that you are using _m instead of month and _y instead of year, so a query might look like:

    http://hv.crosbydev.com/events-widget/?_m=01&_y=2013

    #30773
    Crosby
    Participant

    I can also now confirm that using &.amp; does not fix the problem. That is not a viable solution. I tested more thoroughly on another site using the same script and it wouldn’t load events that existed in 2012 that would load when i just & in the url. So I’m thinking the proper url format to send the data is just using a &. This seems very odd that when changing the year to 2013 all of a sudden breaks the script. I’m still stumped.

    #30774
    Crosby
    Participant

    yes i’ll try that out now and report back.

    #30776
    Crosby
    Participant

    aah yeah, that definitely helped.

    http://hv.crosbydev.com/events-widget/?_m=01&_y=2013&getAll=true

    You can see the couple demo events i plugged in there.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Events Calenar year 2013 bug’ is closed to new replies.