10390 Posts in 2201 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1411 Views |
-
Diary Module Problem with Previous/Next month

7 April 2009 at 6:36am
I'm not sure if this should be in this forum or the widget forum but here goes.
I wondered if anyone else had the same problem and found a a solution.
When I press on the "Previous" or "next" to change the month of the diary widget I get an error:
[Notice] Use of undefined constant month - assumed 'month'
GET /silverstripe/my-diary/setMonth/?month=1235862000&back=my-diaryLine 320 in C:\wamp\www\silverstripe\diary\code\DiaryHolder.php
Source311 Session::set("EventType",$_GET['name']);
312 $cal = DataObject::get_one('DiaryHolder');
313 Director::redirect($cal->URLSegment . "/");
314 }
315
316 /*
317 * Set the month for the calendar widget
318 */
319 function setMonth(){
320 Session::set("CalMonth",(int)$_GET[month]);
321 Director::redirect($_GET['back']."/");
322 }
323
324 /*
325 * Events RSS Feed Link
326 */Trace
* DiaryHolder_Controller->setMonth(HTTPRequest)
Line 162 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 19 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 262 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 106 of Director.php
* Director::direct(/my-diary/setMonth/)
Line 115 of main.php -
Re: Diary Module Problem with Previous/Next month

20 April 2009 at 7:00pm Last edited: 20 April 2009 7:02pm
I contacted the module's author and he gave me this fix, which worked.
it seems like a little bug which fires on your server, it is WAMP I think.
anyway to prevent it replace the line number 320 with the following.
Session::set("CalMonth",(int)$_GET['month']);
-
Re: Diary Module Problem with Previous/Next month

29 April 2009 at 4:16am
Sorry for not being able to reply to this earlier, anyway thanka Varberg for posting my solution on the forum.
| 1411 Views | ||
|
Page:
1
|
Go to Top |


