[RC 2 Bug?] Calendar Generating Error With Default RC2 Theme

Started by Nakitomimaru, January 05, 2006, 12:41:45 AM

Previous topic - Next topic

Nakitomimaru

8: Undefined index: calendar_shortedit
File: /*rootobscured*/forum/Themes/default/Display.template.php (eval?)
Line: 158


I'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.
Quote

It looks to me as though there is supposed to be something between the [] there.
Lord Nakitomimaru

Grudge

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'] : '');
I'm only a half geek really...

Kindred

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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

zombiemanx

Remove the ; and replace it with ,  ' and it will be fine.
[nofollow]

Grudge

Yea, my bad. Strangely enough I commited the fixed version into CVS, must have copied and pasted the wrong line :/
I'm only a half geek really...

alchemy

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 ?


Kindred

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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

alchemy

Thanks for the update I was confused which code to use  ;D

Nakitomimaru

#8
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.
Lord Nakitomimaru

Grudge

That is indeed intentional. Editing the default theme makes upgrading hard.
I'm only a half geek really...

Advertisement: