Ideas

This board is only for raising and voting on feature requests (Ideas / Suggestions).
Please raise any Bugs via "Get Help" button on your calendar admin dashboard.

Server Side Embed not respecting `sse` attribute

The SSE calendar URL takes an `sse` attribute in order to allow events to link to another page. The href for the links is built out correctly however there is javascript in the `calendar.js` that overrides the href location with the current location + a event attribute.

 

The offending code appears in calendar.js:2308

 var loadEvent = function ( id, propagate, exact_href ) {
if ( sse ) {
/* Server-Side Embedded */
var instance = exact_href.match( /instance=\d+/ );
if ( instance ) {
instance = '&' + instance;
} else {
instance = '';
}
location.href = location.pathname + '?event=' + id + instance;
} else if ( frameId ) {
/* Iframe embedded */
var l = exact_href ? exact_href : calendarUrl + '?event=' + id;
parent.postMessage({
timelyED : l,
timelyFrame : frameId + 'f'
}, '*' );
} else {
/* Not embedded or an iframe with no script (wix) */
location.href = exact_href ? exact_href : calendarUrl + '/' + id;
}
}

 

this function uses the location.pathname instead of the url provided in the `sse` attribute or just using the href that is build out on the event link html.

 

This makes it impossible to use separate pages for for the full calendar and single events (for SEO purposes) and perhaps more importantly to use the SSE code to embed event widgets on other locations around our site that link back to the calendar.

 

-Ryan 

  • Guest
  • Jan 16 2018
  • Planned: Web App
  • Attach files
  • Admin
    Rik Logtenberg commented
    18 Jan 10:51

    Hello! Thanks for reporting this issue. 

    I'm sending it to our technical team, to check and create a fix for it.

    Thanks,
    Timely Dev Team