0
votes

I'm using the base Event calendar as a starting point and we've noticed something strange. As we know, each event becomes it's own page. My Event Title filed becomes the page URL. What we've seen is, if there is an underscore in the event title, The event details do not render as the should.

If i manually changes the page URL from an underscore to a hyphen, the details render correctly.

Adding a hyphen to the Event Title seems to be the issue.

To help trouble shoot this, what's needed from me?

This is my transformation code:

<section id="eventDetail">
  <h1><%# Eval("EventTitle") %></h1>
  <h2><%# CMS.Helpers.ResHelper.GetString("kff.Generic-From")%>:</h2>
  <p><%# FormatDateTime(Eval("EventStart"),"dddd, MMMM d, yyyy h:mm tt") %></p>
  <h2><%# CMS.Helpers.ResHelper.GetString("kff.Generic-To")%>:</h2>
  <p><%# FormatDateTime(Eval("EventEnd"),"dddd, MMMM d, yyyy h:mm tt") %></p>
  <h2><%# CMS.Helpers.ResHelper.GetString("kff.Generic-Location")%>:</h2>
  <p><%# Eval("EventLocation") %></p>
  <h2><%# CMS.Helpers.ResHelper.GetString("kff.Generic-Details")%>:</h2>
  <p><%# Eval("EventDescription") %></p>
  
  
</section>

I've added screen shots of the rendered pages.

Event example - not working Event example - working

1
This sounds like a bug.. I would recommend to check this out with Kentico support team ([email protected]). Otherwise you could "fix" this by creating a global event where you would replace the underscore automatically so you don't have to keep that in mind. - Enn
Going through the bug list, looks like it was fixed in 9.0.10. I'm on 9.05, and we haven't worked through our upgrade process yet. Waiting on hearing confirmation on this from Kentico. - Mark Handy

1 Answers

3
votes

If you're having issues with underscores in names, then just add the underscore to the list of forbidden characters to rewrite in Settings>URLs & SEO? No need to wait for an upgrade or a hotfix, just resolve it yourself.