5317 Posts in 1593 Topics by 1165 members
|Go to End|
16 February 2010 at 8:50am Last edited: 5 May 2010 7:36pm
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
Line 454 in /sapphire/core/control/Controller.php
/explore/record-name/ -> class Record extends Page
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 => editComment
I hope you can help meâ€¦
I have almost forgotten. I use silverstripe 2.4 beta
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.
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?
|Go to Top|