• Resolved Enej Bajgori?

    (@enej)


    Hi
    I can’t seem to get the calendar to show up any recurring events that are happening on Monday and Thursday. The calendar only shows events that are displaying on Monday but not on Thursday. Like I though they would.

    Thanks and great work on the calendar plugin.

Viewing 11 replies - 16 through 26 (of 26 total)
  • thaunak

    (@thaunak)

    Thank you, Layotte! It’s good to see my data is there. I didn’t even think of that.

    I’m using the latest version of WP. I’ve changed the color label and saved a couple times, trying different color options. No change. I even tried deactivating MyCalendar, that didn’t work either.

    I also just updated FT Calendar.

    I still love this calendar….so much better than what I was using. ?? But I just want to see my data.

    thaunak,

    Can you contact me – info (a) calendar-plugin.com – with your WordPress administrator credentials? I’d like to see what’s happening here (and fix this).

    Thanks.

    Hey layotte,

    I also have a problem with recurring events weekly – i’ve tested recurring daily and it works fine but not weekly…. I have the latest versions of both WP and FT cal

    (if it is relevant at all: I was using The Events Calendar but i deactivate it)

    Hi rdallal,

    I’ll be looking into this. Thanks for the report.

    Lew

    Hi rdallal,

    In /classes/class-shortcode.php, change lines 1091-1109 to this:

    case 'weekly' :
    	$day = date_i18n( 'w', $str_rsdate * 86400 ); 	//Get numeric day
    	$str_rsweek = $str_rsdate - $day;		//Set start week
    	$dow = array();	//track days of week and numeric days that event falls on
    	$days = array();
    
    	$days_of_week = array( 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' );
    	for ( $x = 0; $x < 7; $x++) {
    		if ( 1 == substr( $cal_data->r_on, $x, 1 ) ) {
    			$dow[] = $days_of_week[$x];
    			$days[] = $x;
    		}
    	}
    
    	if ( in_array( date_i18n( 'D', $strdate ), $dow )
    			&& in_array( ( $i - $str_rsweek ) % ( $cal_data->r_every * 7 ), $days ) ) {
    		$cal_entries[date_i18n( 'Y-m-d', $strdate )][$rstime][] = $cal_data->id;
    	}
    	break;

    That should fix it… I’ll add this to the next update.

    Lew

    Some folks may have a problem in IE because the write-edit-post.js code for function set_repeating_displays() uses “repeats_every” as the name of a local variable and tries to assign $(‘select#repeats_every_select’).val() to it. But “repeats_every” is already the id of a <tr> element, which means IE created a window-level variable with that name for you.

    The effect is that repeating weekly events cannot be created properly in the post editing page. I changed the “repeats_every” variable name to “repeats_every_var” and it all works great now.

    paulwms, What version of IE are you having this trouble?

    Thanks.

    Hi Layotte – I’m still using IE8. But IE has been using element id’s to name window properties for some time now. Have you not seen this problem with your IE version? It doesn’t affect Firefox users because Mozilla does not do that.

    — Paul

    After thinking this through with the clarity that morning caffeine often provides, it occurs to me that the proper fix for this issue is simply to use ‘var’ to declare the repeats_every variable as a local variable in the set_repeating_displays() function. (I’m told its a good habit anyway.) Thereby, removing the ambiguity with the IE property named for the <tr id=”repeats_every”> element.

    — Paul

    Thanks Paul, I’ve fixed it for the next release.

    thanks Layotte – it worked!

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘[Plugin: FT Calendar] Recurring events broken.’ is closed to new replies.