Jump to content


Photo

Bug in latest Calendar upgrade?


There is an apparent bug in the latest calendar software. The events listings in the right hand bar will default back to "no forthcoming events" at times and you have to re-cache the calendar manually (scheduled does not work) to get them back. This happened after upgrading. It is affecting 2 different forums on 2 different servers, so i am sure its a bug. I put a trouble ticket in on it.

The only thing I did recently at the same time I upgraded, that may be the a cause by coincidence, is set a server load limit on both forums. I have just removed it off one of them to see if the problem goes away on that one.

Status: Fixed
Version: 3.2.1
Fixed In: 3.3.0


31 Comments

Let's troubleshoot this through the ticket. I can envision ways this could come up under certain configurations, but I am not reproducing locally, so we will likely need to see your site specifically to find the issue you are experiencing.
Ok.. I have this narrowed, but.. Unsure of the 'fix'..

        if( !$calendar->initCalendar( true ) )
        {
            $this->cache->setCache( 'calendar_events' , array(), array( 'array' => 1 ) );
            $this->cache->setCache( 'birthdays', array(), array( 'array' => 1 ) );
            return;
        }

that.. in /admin/applications_addon/ips/calendar/sources/cache.php is the culprit..

So.. True is for return.. so, it's returning false.. Which seems to lead back to this..

        $this->calendar        = $this->functions->getCalendar();

        if( !$this->calendar['cal_id'] )
        {
            if( $return )
            {
                return false;
            }

Which leads us back to this..

    public function getCalendar( $calendar_id=0 )
    {
        return $this->calendars[ !empty($calendar_id) ? ( isset( $this->calendars[ $calendar_id ] ) ? $calendar_id : $this->calendarId ) : $this->calendarId ];
    }

Since we're not passing a default calendar to it.. It's reading 0.. Failing? But, why when you run the task manually does it work?

Ok.. Manually run it.. I get $this->calendarId = 1, same when automated.

Manually run it or automated.. $calendar_id = 0

dump the whole shebang..

array(29) { ["cal_id"]=> string(1) "1" ["cal_title"]=> string(18) "Community Calendar" ["cal_moderate"]=> string(1) "0" ["cal_position"]=> string(1) "0" ["cal_event_limit"]=> string(1) "2" ["cal_bday_limit"]=> string(1) "1" ["cal_rss_export"]=> string(1) "1" ["cal_rss_export_days"]=> string(2) "14" ["cal_rss_export_max"]=> string(2) "20" ["cal_rss_update"]=> string(4) "1440" ["cal_rss_update_last"]=> string(10) "1318499593" ["cal_rss_cache"]=> string(318) " http://www.radiogodsforum.com/beta/calendar/1-community-calendar Thu, 13 Oct 2011 09:53:13 +0000 86400 Community Calendar " ["cal_title_seo"]=> string(18) "community-calendar" ["cal_comment_moderate"]=> string(1) "0" ["cal_rsvp_owner"]=> string(1) "1" ["perm_id"]=> string(2) "48" ["app"]=> string(8) "calendar" ["perm_type"]=> string(8) "calendar" ["perm_type_id"]=> string(1) "1" ["perm_view"]=> string(9) ",4,2,3,6," ["perm_2"]=> string(7) ",4,3,6," ["perm_3"]=> string(7) ",4,3,6," ["perm_4"]=> string(5) ",4,3," ["perm_5"]=> string(5) ",4,3," ["perm_6"]=> string(1) "*" ["perm_7"]=> string(5) ",4,3," ["owner_only"]=> string(1) "0" ["friend_only"]=> string(1) "0" ["authorized_users"]=> NULL }

That's manual..

array(29) { ["cal_id"]=> string(1) "1" ["cal_title"]=> string(18) "Community Calendar" ["cal_moderate"]=> string(1) "0" ["cal_position"]=> string(1) "0" ["cal_event_limit"]=> string(1) "2" ["cal_bday_limit"]=> string(1) "1" ["cal_rss_export"]=> string(1) "1" ["cal_rss_export_days"]=> string(2) "14" ["cal_rss_export_max"]=> string(2) "20" ["cal_rss_update"]=> string(4) "1440" ["cal_rss_update_last"]=> string(10) "1318499593" ["cal_rss_cache"]=> string(318) " http://www.radiogodsforum.com/beta/calendar/1-community-calendar Thu, 13 Oct 2011 09:53:13 +0000 86400 Community Calendar " ["cal_title_seo"]=> string(18) "community-calendar" ["cal_comment_moderate"]=> string(1) "0" ["cal_rsvp_owner"]=> string(1) "1" ["perm_id"]=> string(2) "48" ["app"]=> string(8) "calendar" ["perm_type"]=> string(8) "calendar" ["perm_type_id"]=> string(1) "1" ["perm_view"]=> string(9) ",4,2,3,6," ["perm_2"]=> string(7) ",4,3,6," ["perm_3"]=> string(7) ",4,3,6," ["perm_4"]=> string(5) ",4,3," ["perm_5"]=> string(5) ",4,3," ["perm_6"]=> string(1) "*" ["perm_7"]=> string(5) ",4,3," ["owner_only"]=> string(1) "0" ["friend_only"]=> string(1) "0" ["authorized_users"]=> NULL }

That's automated..

Same thing..

So.. I don't know, but if you comment out that first part.. It 'works'. But probably introduces a secondary problem.
Will revisit, but we may need that ticket sent up to troubleshoot further. My events don't disappear - could have to do with a certain permissions configuration.
Well Jason has the info to access my forum www.truckcamperforums.com, both the admin login & the FTP access. You have my permission to play with it as much as you wish, to try & track this down. The events section on that forum is quiet at this moment, only one ranged event & a test single event. It is happening on my other forum on another server ( http://www.mexicorvforums.com/forum) where the events are a customized main part of it, I am just re-caching all the time to keep them up there. BTW it has no effect on RSS feeds. if you need FTP access to that one let me know. The admin log in is the same as the other forum.
Further to my post above, the RSS feeds from http://www.mexicorvforums.com/forum appear at this website: http://www.mexicotravelbuddies.com. That list remains up, even though the events listings disappear on the actual forum. The problem was definitely not there in the previous calendar version, so its something that has been introduced with this version.
For what its worth on the one forum where I keep re-caching, the listings seem to disappear regularly each eve around the same time. maybe just coincidence.
Been observing for a few days, they definitely disappear once per 24 hours, I haven't been able to pin down if it is exactly the same time, but its within a 2 hour time frame each day aroudn 3 PM GMT. that makes me suspect another scheduled procedure is causing it. Maybe I will try disabling any scheduled procedure around that time & see what happens.
I just when to see about doing that and I noticed something. There are several scheduled tasks that indicate their next run time is around 3pm GMT. Most of them are hourly or 30 every 30 min tasks when I look at them.
Every single one of them has the little icon in red, instead of blue. I will PM you my root login.
Testing a fix via a ticket.
OK if you want to try it by uploading it onto my truckcamperforums site, that one is deleting the events list several times a day. PM me for the FTP info.
I haven't heard back, so feel free to test this fix as well:

admin\applications_addon\ips\calendar\modules_public\calendar\view.php

change

//-----------------------------------------
        // Functions class
        //-----------------------------------------
        
        $classToLoad        = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/functions.php", 'app_calendar_classes_functions', 'calendar' );
        $this->functions    = new $classToLoad( $this->registry );

to

//-----------------------------------------
        // Functions class
        //-----------------------------------------
        
        $classToLoad        = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/functions.php", 'app_calendar_classes_functions', 'calendar' );
        $this->functions    = new $classToLoad( $this->registry, $return );
That looks promising. Neither of my 2 forums deleted events over the last 16 hours. Will let you know after another 12 hours
Thanks for the update

I haven't heard back, so feel free to test this fix as well:admin\applications_addon\ips\calendar\modules_public\calendar\view.phpchange

//-----------------------------------------		// Functions class		//-----------------------------------------				$classToLoad		= IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/functions.php", 'app_calendar_classes_functions', 'calendar' );		$this->functions	= new $classToLoad( $this->registry );
to
//-----------------------------------------		// Functions class		//-----------------------------------------				$classToLoad		= IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/functions.php", 'app_calendar_classes_functions', 'calendar' );		$this->functions	= new $classToLoad( $this->registry, $return );


I am having this same issue. If I do the above that rectifies the problem?
Yes.
Cool, thanks.

So far so good. :)
Thanks for the fix, now working correctly for me :)
I'm not having the problems listed above. My problem is the side bar calendar is one day behind the main calendar and sometimes the birthdays show and sometime not. Any help will be greatly appreciated.
Thanks in advance

I'm not having the problems listed above. My problem is the side bar calendar is one day behind the main calendar and sometimes the birthdays show and sometime not. Any help will be greatly appreciated.Thanks in advance


This has nothing to do with the bug reported.

This has nothing to do with the bug reported.


That was no help at all just a waste of space.
If you are experiencing a completely separate and unrelated issue to the one in this report (as you are), you should either

1) Post in the peer help forum
2) Submit a support ticket
or
3) Start a new bug report

Your post in this report is akin to replying to a topic about strawberries discussing car engines. :) The two are completely unrelated.
subscribed
this says it was fixed in 3.2.3 but I have the same issue and I have 3.2.3.
so, the fix suggested in this thread was not changed in 3.2.3. I have the old code.
Calendar 3.2.3 has not been released yet, only 3.2.2. The 3.2.3 version we have released was IP.Board.