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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Search in blog does not work


Go to End


6 Posts   3467 Views

Avatar
Mikle

Community Member, 1 Post

8 September 2009 at 8:35am

After click on the search button in blog I have got next : "Action 'SearchForm' isn't allowed on class BlogHolder_Controller".
In order to fix a little bug you should add 'SeachForm' to $allowed_actions array in BlogHolder.php

static $allowed_actions = array(
'postblog' => 'BLOGMANAGEMENT',
'post' => 'BLOGMANAGEMENT',
'BlogEntryForm' => 'BLOGMANAGEMENT',
'rss',
'tag',
'showarchive',
'SearchForm',

);

Avatar
Willr

Forum Moderator, 5523 Posts

8 September 2009 at 5:59pm

Hey Mikle,

You might like to add this to open.silverstripe.org as a ticket (if it isn't already) so that the core devs can track the issue and get the fix into the module

Avatar
ajshort

Community Member, 244 Posts

8 September 2009 at 6:10pm

Actually, the default Page type should have SearchForm added to its $allowed_actions, and BlogHolder will just pick this up.

Avatar
Silversurver

Community Member, 1 Post

22 October 2009 at 12:01am

Hello,
it works ;-)
Thank you, it helps me a lot.

Avatar
DsX

Community Member, 178 Posts

21 January 2010 at 2:20pm

Edited: 21/01/2010 4:21pm

just to make this a little more clear to newbies could someone please tell us exactly what to add
to our mysite/code/Page.php I believe it will be right before the init method of your controller.

I have tried this..

class Page_Controller extends ContentController {
	
	static $allowed_actions = array(
      'SearchForm',

   );
	
	public function init() {

How ever it seemed to cause a problem adding new posts from the blog page. I have since opted for the cade sample provided for the BlogHolder.php

Avatar
DsX

Community Member, 178 Posts

23 January 2010 at 6:07am

I still have a problem that I believe is related.
I have used the code to solve the search issue as shown early in this thread.
I now have a problem with the 'Post a new blog entry' link shown when viewing a post. (BlogEntry)
When I click to post a new blog I receive this error: Action 'post' isn't allowed on class BlogHolder_Controller
It seems to be a related issue since the error is similar, however there is a 'post' entry already.
Anyone else come across this? I have tried the latest build but it won't install for me.