Forum

Thread tagged as: Problem, Blog

Delete default 'blog' breaks the blog app

I am just setting up a new site with Runway and the new blog app. I wanted to create two blogs. 1.News and 2. Stories. So I installed and setup the blog app etc. I went into the app in the back-end and created a new blog called news. I then proceeded to delete the default 'blog' blog and after doing this I now get a 500 error when trying to access blog in the back-end menu.

I looked in the logs and I get this error;

[24-Nov-2015 10:07:15 UTC] PHP Fatal error: Call to a member function setSlug() on a non-object in /Users/amasci/Dropbox/Amasci/Websites/Supershoes/supershoes.org.uk/cms/addons/apps/perch_blog/modes/list.pre.php on line 37

Terry Upton

Terry Upton 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It probably would have been better to just rename the default.

No immediate fix, but a workaround is to go into the perch2_blogs table and set the blogID of your default blog to 1

Thanks Drew. Yeah I fixed, thanks. But wanted to highlight it to you as it is an easy mistake to make and no fail-safe, so 'new' Perchers might have similar issue.

Perhaps the first blog item shouldn't be delete-able just rename-able.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No it's just a typo in the code - loading in blog 1 instead of first().