diff --git a/app/assets/javascripts/discourse/models/composer.js.es6 b/app/assets/javascripts/discourse/models/composer.js.es6 index 1b75c77e94b..dfb81f6da85 100644 --- a/app/assets/javascripts/discourse/models/composer.js.es6 +++ b/app/assets/javascripts/discourse/models/composer.js.es6 @@ -487,7 +487,8 @@ const Composer = RestModel.extend({ moderator: user.get('moderator'), admin: user.get('admin'), yours: true, - read: true + read: true, + wiki: false }); this.serialize(_create_serializer, createdPost); diff --git a/app/assets/javascripts/discourse/models/post.js.es6 b/app/assets/javascripts/discourse/models/post.js.es6 index 4ada9a1eb57..350f2e3c43d 100644 --- a/app/assets/javascripts/discourse/models/post.js.es6 +++ b/app/assets/javascripts/discourse/models/post.js.es6 @@ -1,4 +1,5 @@ import RestModel from 'discourse/models/rest'; +import { popupAjaxError } from 'discourse/lib/ajax-error'; const Post = RestModel.extend({ @@ -79,13 +80,7 @@ const Post = RestModel.extend({ data: data }).then(function () { self.incrementProperty("version"); - }, function (error) { - if (error && error.responseText) { - bootbox.alert($.parseJSON(error.responseText).errors[0]); - } else { - bootbox.alert(I18n.t("generic_error")); - } - }); + }).catch(popupAjaxError); }, internalLinks: function() {