5093 Posts in 1516 Topics by 1113 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1584 Views |
-
url_handlers problem

16 February 2010 at 8:50am Last edited: 5 May 2010 7:36pm
Hi,
I play something with the url_handlers and I have a problem…
I get the following error when I test my URLs:[User Warning] popCurrent called on ModelAsController controller, but it wasn't at the top of the stack
GET /explore/record-name/comments/add/12/?flush=1
Line 454 in /sapphire/core/control/Controller.php/explore/record-name/ -> class Record extends Page
in Record_Controller:
public static $url_handlers = array(
'' => 'index' // works
,'comments' => 'showComments' // works
,'POST comments/$Action' => 'commentAction'
,'comments/$Action/$ID' => 'editComment'
);I try to access the following urls:
/explore/record-name/comments => with index
/explore/record-name/comments/add => commentAction
/explore/record-name/comments/edit/$ID => editComment
/explore/record-name/comments/delete/$ID => editCommentI hope you can help me…
JörnI have almost forgotten. I use silverstripe 2.4 beta
-
Re: url_handlers problem

14 June 2011 at 3:37am
Don't know if you still need help with this but I had the same problem with my url handlers.
I finally found that i had forgotten to add the methods to the allowed actions list.
-
Re: url_handlers problem

17 August 2011 at 5:33pm
Not sure if this is the same problem as I'm having, but I'm trying to do a similar thing with the URL. However, I want to have domain.com/myPage/show/ID/otherID/itemID
it could go one or two more deeper, but I'm just trying to get the $ItemID part figured out.@Wade, how did you end up using the allowed actions list?
Thanks.
| 1584 Views | ||
|
Page:
1
|
Go to Top |



