Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

allowed actions in extension

Go to End

3 Posts   3078 Views


Community Member, 9 Posts

3 January 2014 at 4:37am

hello everybody
i have little problem with this code

class PageControllerExtension extends Extension 
	private static $allowed_actions = array(

	public function loadNextPage()
		$pl = $this->owner->PaginatedList();


when i call url with this method "something/loadNextPage" it doesnt work
is still possible call actions defined in extensions?


Forum Moderator, 5523 Posts

3 January 2014 at 6:28pm

I haven't tested this myself but last time I did it didn't work so I created my own controller / route and used that instead. But that was back in 2.4. Make sure you've done a ?flush=1 and that the extension is added to the controller. Looking at the implementation of it (RequestHandler::allowedActions) it should work.


Community Member, 9 Posts

3 January 2014 at 10:48pm

Thanks Willr, I was pretty sure I flushed this page becouse other methods work but obviously not...
after flush works perfect