Ghost/core/server/models/base
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
..
index.js 🐛 Fixed slugs from exceeding db limit (#9251) 2017-11-21 14:21:22 +01:00
listeners.js 🎨 do not run model listeners on import (#8720) 2017-07-21 09:58:58 +01:00
token.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
utils.js 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00