- Posts: 128
[Solved] Calendar showing DEC month and all zeros
- Ron Wells
- Topic Author
- Offline
- Premium Member
-
Less
More
15 years 2 months ago - 15 years 2 months ago #1
by Ron Wells
[Solved] Calendar showing DEC month and all zeros was created by Ron Wells
From garratt83 post:
Having same issue as this user from R0.25.
Everything is checking out OK on setup. How did you fix for person above? This was working correctly on our site before but noticed it failing with both R0.4 and now with R0.5.
Thanks,
Ron
- Does it show the calendar module / software at all? Yes the calender comes up with correct month but not events when not logged in. However if you login the calendar changes to 0 (zeros) for each day and Demeber as the month
- Does it show and course event details on the calendar or completely blank?
No course events
- What happens when you click through to the courses from the courses module?
It goes straight in to the moodle and I'm logged in
- For the user ID logged into Joomla, are they enrolled in the course with the event details already?
Yes
Having same issue as this user from R0.25.
Everything is checking out OK on setup. How did you fix for person above? This was working correctly on our site before but noticed it failing with both R0.4 and now with R0.5.
Thanks,
Ron
Last edit: 15 years 2 months ago by Ron Wells.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 2 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: Calendar showing DEC month and all zeros
Hi.
I think it can be a short tags issue. I really thought I had removed them all, but is just not the case
in modules/mod_joomdle_calendar/tmpl/default.php there are two "<?" tags. Search form them an replace by "<?php".
I think it can be a short tags issue. I really thought I had removed them all, but is just not the case
in modules/mod_joomdle_calendar/tmpl/default.php there are two "<?" tags. Search form them an replace by "<?php".
The topic has been locked.
- Ron Wells
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
15 years 2 months ago - 15 years 2 months ago #3
by Ron Wells
Is this the section you are referring to? I added the php to the second and third tag in this code...
Replied by Ron Wells on topic Re: Calendar showing DEC month and all zeros
Code:
<tr><td colspan="5">
<table width="100%" id="day_table" class="day_table">
<tr>
<?php if ($start_monday) : ?>
<td id="day_name_0" class="day_name"><?php echo JText::_('MON'); ?></td>
<td id="day_name_1" class="day_name"><?php echo JText::_('TUE'); ?></td>
<td id="day_name_2" class="day_name"><?php echo JText::_('WED'); ?></td>
<td id="day_name_3" class="day_name"><?php echo JText::_('THU'); ?></td>
<td id="day_name_4" class="day_name"><?php echo JText::_('FRI'); ?></td>
<td id="day_name_5" class="day_name"><?php echo JText::_('SAT'); ?></td>
<td id="day_name_6" class="day_name"><?php echo JText::_('SUN'); ?></td>
<?php else : ?>
<td id="day_name_0" class="day_name"><?php echo JText::_('SUN'); ?></td>
<td id="day_name_1" class="day_name"><?php echo JText::_('MON'); ?></td>
<td id="day_name_2" class="day_name"><?php echo JText::_('TUE'); ?></td>
<td id="day_name_3" class="day_name"><?php echo JText::_('WED'); ?></td>
<td id="day_name_4" class="day_name"><?php echo JText::_('THU'); ?></td>
<td id="day_name_5" class="day_name"><?php echo JText::_('FRI'); ?></td>
<td id="day_name_6" class="day_name"><?php echo JText::_('SAT'); ?></td>
<?php endif; ?>
Is this the section you are referring to? I added the php to the second and third tag in this code...
Last edit: 15 years 2 months ago by Ron Wells.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 2 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Re: Calendar showing DEC month and all zeros
Yes, there. Does it make any change?
The topic has been locked.
- Ron Wells
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
15 years 2 months ago #5
by Ron Wells
Replied by Ron Wells on topic Re: Calendar showing DEC month and all zeros
Still getting same error. Calendar looks fine when not logged in. Once logged in, it shows DEC with all zeros... Note I am not showing global events on the public view -must be registered to see...
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 2 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic Re: Calendar showing DEC month and all zeros
I read the old topics about this. Althoug they offer no response, I think we did indeed find the problem back then....but I can't remember. Maybe Chris does?
Just to test the easy one: can you switch template to see if problem persists?
Just to test the easy one: can you switch template to see if problem persists?
The topic has been locked.
- Ron Wells
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
15 years 2 months ago #7
by Ron Wells
Replied by Ron Wells on topic Re: Calendar showing DEC month and all zeros
I tried changing templates - did not fix. I just sent you access to our development site. Pls check out if you have time...
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 2 months ago #8
by Antonio Durán
Replied by Antonio Durán on topic Re: Calendar showing DEC month and all zeros
Hi.
I think I found the problem, and as expected it is a Joomdle bug
Problem only happens with events conatining "'" (like your saint valentine's). This breaks javascript code.
Fix is only one line. In modules/mod_joomdle_calendar/tmpl/default.php, line ~26. Change:
$n_events[$i] = $evento["name"];
By:
$n_events[$i] = str_replace ("'", "\'", $evento["name"]);
That should make it work.
I think I found the problem, and as expected it is a Joomdle bug
Problem only happens with events conatining "'" (like your saint valentine's). This breaks javascript code.
Fix is only one line. In modules/mod_joomdle_calendar/tmpl/default.php, line ~26. Change:
$n_events[$i] = $evento["name"];
By:
$n_events[$i] = str_replace ("'", "\'", $evento["name"]);
That should make it work.
The topic has been locked.
- Ron Wells
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
15 years 2 months ago #9
by Ron Wells
Replied by Ron Wells on topic Re: Calendar showing DEC month and all zeros
That was it! Fixed...
Ron
Ron
The topic has been locked.