8: Undefined index: calendar_shortedit
File: /*rootobscured*/forum/Themes/default/Display.template.php (eval?)
Line: 158I've just installed RC2 for a WoW guild that I play System Admin for, and I've noticed this error for what looks like every single time somebody views a Calendar linked topic. Theme is the default RC2 - very nice looking, BTW, congrats Bloc and company. I've included a screencap of one of the topic pages.
Lainaa

It looks to me as though there is supposed to be something between the [] there.
Oh dear...
In Display.template.php, find:
<b>', $event['title'] , '</b> ' , ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" >[' . $txt['calendar_shortedit'] . ']</a> ' : '') , ': ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
Replace:
', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), '<b>', $event['title'], '</b>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : '');
Grudge,
Don't we need a new openning quote at the end of that line?
changing this:
foreach ($context['calendar_events'] as $event)
echo '
<li>
<b>', $event['title'] , '</b> ' , ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" >[' . $txt['calendar_shortedit'] . ']</a> ' : '') , ': ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
</li>';
to this:
foreach ($context['calendar_events'] as $event)
echo '
<li>
', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), '<b>', $event['title'], '</b>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : '');
</li>';
looks like it will give a parse error...
Remove the ; and replace it with , ' and it will be fine.
Yea, my bad. Strangely enough I commited the fixed version into CVS, must have copied and pasted the wrong line :/
Template Parse Error!
Is what I get after replacing the code. Has something else changed between RC2 and the CVS in relation to that line of code ?
yes, alchemy... as I noted, what Grudge originally wrote will parse wrong...
', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), '<b>', $event['title'], '</b>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
will parse correctly...
Thanks for the update I was confused which code to use ;D
Thanks! That did the trick. ^^ Incidentally, while I'm thinking about it - is it intentional that you can't edit the default theme via the theme editor? It makes sense if so, but considering that it shows up in other places it seemed a little odd when I noticed.
That is indeed intentional. Editing the default theme makes upgrading hard.