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

Cannot Edit or Post New Blog Entry


Go to End


4 Posts   14854 Views

Avatar
Yonix

Community Member, 1 Post

23 August 2012 at 1:47pm

I had a very positive experience installing the Forum module yesterday. I cannot say the same about the blog module.

I think I must be missing something. Can someone please help?

Whats working:
Blog Module has installed and
I can:
- create new blog entries via the CMS
- navigate to the blog and see a list of blog entries via http://www.mydomain.com/blog/
- navigate to view the entire blog post
- Un-publish the blog post
- browse entries by dates
- browse entries by single Tags (i.e Tag 1)

I cannot
- add a new blog entry via http://www.mydomain.com/blog/post
- edit and existing blog entry via http://www.mydomain.com/blog/post/341/
- browse entries by tags that contain spaces (i.e 'Word 1 Word 2) - http://www.mydomain.com/blog/tag/word1+word2 (Results on 404 ERROR)

For adding and editing a blog entry both actions successfully load my page template (i.e menu and footer etc) but no content is loaded. There are no errors reported in my log or shown when I enable them via the global config.

I have undertaken several levels of debugging (I am not a PHP programmer) using URL Variable Tools (http://doc.silverstripe.org/framework/en/reference/urlvariabletools)

Debug URL: http://www.mydomain.com/blog/post/341/?isDev=1&debug=1&debug_request=1

Result.....
Debug (line 139 of ModelAsController.php): Using record #339 of type BlogHolder with link /blog/

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with 'post/341' on BlogHolder_Controller

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with 'post/341' on BlogHolder_Controller

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with 'post/341' on BlogHolder_Controller

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with 'post/341' on BlogHolder_Controller

Debug (line 119 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with 'post/341' on BlogHolder_Controller

Debug (line 128 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on BlogHolder_Controller. Latest request params: array (
'Action' => 'post',
'ID' => '341',
'OtherID' => NULL,
)

Debug (line 167 of SSViewer.php): Selecting templates from the following list: Page

Debug (line 181 of SSViewer.php): Found template 'Page' from main theme 'calm': array (
'main' => 'C:\\My site directory/themes/my template/templates/Page.ss',
)

Debug (line 202 of SSViewer.php): Final template selections made: array (
'main' => 'C:\\My site directory/themes/my template/templates/Page.ss',
)

It doesn't seem to match the Id?

Here's some background on my setup and the actions I have taken to date:

Silverstripe Version: 2.4.5

Hosted on IIS 7

Blog Module Version: 0.5 (This was not available on http://www.silverstripe.org/blog-module/ so I downloaded the 0.5 branch (https://github.com/silverstripe/silverstripe-blog/tree/0.5) - I have also tried 0.4 and encountered the same problem

The blog module has been installed in the directory called 'Blog' but I have also tried it using the 'silverstripe-silverstripe-blog-90a0e80'

I have looked at a number of posts in this forum and looked at the solutions, but most of these are a few years old and all of the code changes seem to be reflected in 0.5 branch

Here are a few of the posts I have looked at:
http://www.silverstripe.org/archive/show/1613
http://www.silverstripe.org/blog-module-forum/show/17515
http://www.silverstripe.org/blog-module-forum/show/13366
http://www.silverstripe.org/archive/show/2064
http://www.silverstripe.org/blog-module-forum/show/18889
http://www.silverstripe.org/archive/show/3493
http://www.silverstripe.org/archive/show/4277

Avatar
haantje72

Community Member, 69 Posts

4 September 2012 at 6:39am

i've had the same problem.
In the cms admin panel go to the security tab and edit your accountsettings...
date_format should be: 03/09/2012

then it worked for me like a charm

Avatar
timo

Community Member, 47 Posts

5 March 2015 at 11:13am

Edited: 07/03/2015 6:40am

also i had this problem.
the link wasn't built properly.
after hours of trying i fount that a custom link function on Page.php occured the fail-function.

in my case i had :

 function Link() {
		if($this->FirstSub) { 
			if($this->Children()->First())
				return $this->Children()->First()->Link();
			}
		return parent::Link();
	} 

and changed it to:

public function Link($action = '') {
		if(isset($this->FirstSub) && $this->FirstSub == 1) { 
			if($this->Children()->First()){
				return $this->Children()->First()->Link();
			}
		}else{
			return parent::Link($action);
		}
	
	}

Maybe this helps someone.

Avatar
clipvietbao

Community Member, 1 Post

7 May 2015 at 8:38pm

custom link function on Page.php