Ghost/core/server/api/v0.1
Kevin Ansfield 32f3f9d2c3 🐛 Fixed "unsaved changes" modal displaying when post has been saved
refs https://github.com/TryGhost/Ghost/issues/10477

The unsaved changes modal is displaying even when the post has been saved if images have been uploaded because the server is transforming absolute image urls to relative during input of the `mobiledoc` field but not transforming them back to absolute during output. The editor then thinks it's out of sync and shows the warning when trying to leave.

- `@tryghost/url-utils` has been updated with new methods for transforming URLs in mobiledoc content
- moves absolute->relative transformation from the API input serializers into the Post model
- transforms URLs in more fields for a more comprehensive transformation and fewer issues when re-configuring a site's domain
  - previously there could be problems with internal links between posts not being transformed so you could change the url config to newdomain.com but links in post content would still be pointing to olddomain.com
- updates the API post output serializers to transform all modified fields
- drops the `?absolute_urls=true` param switch from the `canary` API post output serializer so that all URLs are output as absolute
  - we're transforming more urls to relative when saving so this is necessary to ensure the unsaved changes modal is not triggered
  - the query param isn't documented and will disappear in v3
2019-10-07 22:59:19 +01:00
..
decorators 🐛 Fixed "unsaved changes" modal displaying when post has been saved 2019-10-07 22:59:19 +01:00
authentication.js Renamed sendNotification to sendWelcomeMail 2019-07-30 16:15:53 +02:00
clients.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
configuration.js Migrated to use url-utils from Ghost-SDK (#10787) 2019-06-18 15:13:55 +02:00
db.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
index.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
invites.js Migrated to use url-utils from Ghost-SDK (#10787) 2019-06-18 15:13:55 +02:00
mail.js Updated links to docs (#10941) 2019-07-22 18:17:50 +08:00
notifications.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
oembed.js Add url as context to oembed unknownProvider error 2019-06-13 12:57:02 +01:00
posts.js Revert post.page->post.type handling 2019-08-19 12:02:14 +01:00
redirects.js Extracted frontend code from redirects API controllers (#10798) 2019-06-21 16:50:16 +02:00
roles.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
schedules.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
settings.js Moved settings dynamicRouting to routing.settings 2019-06-21 16:34:17 +02:00
slack.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
slugs.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
subscribers.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
tags.js 🐛 Fixed 'url' attribute miscalculation when when requested as the only part of fields filter (#9969) 2018-10-15 14:47:56 +02:00
themes.js 🐛 Fixed theme upload error when overriding existing 2019-07-11 15:34:15 +05:30
upload.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
users.js Added some deprecation notes for x_by fields 2019-01-03 17:14:52 +01:00
utils.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
webhooks.js Added new site.changed event and webhook trigger service (#10019) 2018-10-19 00:01:30 +05:30