Permalink
Browse files

Fix blog posts fail with permalink & feed_id requiring values

  • Loading branch information...
MitchellMcKenna committed Jan 19, 2017
1 parent f852478 commit a7eb3b6f039999e2837887f502f38ed928b02d87
Showing with 7 additions and 0 deletions.
  1. +7 −0 application/controllers/admin/write.php
@@ -131,8 +131,15 @@ function index()
if ($this->input->post('draft') == 'true') {
$new_post->item_status = 'draft';
+ } else {
+ $new_post->item_status = 'publish';
}
+ // Set the permalink to blank for new items
+ $new_post->item_permalink = '';
+ // Set the item feed to 0 for new items
+ $new_post->item_feed_id = 0;
+
$this->item_model->add_blog_post($new_post);
header('Location: '.$this->config->item('base_url').'admin/items');

0 comments on commit a7eb3b6

Please sign in to comment.