Ghost/core/server/models
Aileen Nowak 982a75d6be 🐛 Fixed slugs from exceeding db limit (#9251)
closes #8143

Fixed a potential issue (edge-case), where our generated and validated (in terms of check for existance and add a counter) would return a slug, that will exceed the maximum length of the slug fields (191 chars).

This is mostly possible for the post title, which can be 255 chars long and would generate a slug with the same length. This would prevent the user from actually saving a post.

I tried first to determine the expected length for a slug that already exists, but decided that the **easier** and simplyfied implementation is to always cut a slug to **185 chars** (+ counter). This makes it easier to find duplicates and includes a possible high number of counts (edge-edge-case).

The slug will not be cut down to 185 chars if it's an import.
2017-11-21 14:21:22 +01:00
..
base 🐛 Fixed slugs from exceeding db limit (#9251) 2017-11-21 14:21:22 +01:00
plugins 🐛 Fixed pagination error (#9243) 2017-11-14 12:47:58 +00:00
accesstoken.js
app-field.js
app-setting.js
app.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
client-trusted-domain.js
client.js
index.js
invite.js
permission.js
post.js Allow forUpdate for any model 2017-11-14 10:22:09 +00:00
refreshtoken.js
role.js Support for attribute-based permissions (#9025) 2017-09-26 18:06:14 +02:00
settings.js Refactored to save settings only if value changes (#9194) 2017-10-31 15:47:30 +00:00
subscriber.js Support for attribute-based permissions (#9025) 2017-09-26 18:06:14 +02:00
tag.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
user.js Changed logic for importPersistUser option (#9203) 2017-11-07 09:09:57 +01:00