Ghost/core/server
Katharina Irrgang 1f37ff6053 🎨 refactor the importer (#8473)
refs #5422

- we can support null titles after this PR if we want
- user model: fix getAuthorRole
- user model: support adding roles by name
- we support this for roles as well, this makes it easier when importing related user roles (because usually roles already exists in the database and the related id's are wrong e.g. roles_users)
- base model: support for null created_at or updated_at values
- post or tag slugs are always safe strings
- enable an import of a null slug, no need to crash or to cover this on import layer
- add new DataImporter logic
    - uses a class inheritance mechanism to achieve an easier readability and maintenance
    - schema validation (happens on model layer) was ignored
    - allow to import unknown user id's (see https://github.com/TryGhost/Ghost/issues/8365)
    - most of the duplication handling happens on model layer (we can use the power of unique fields and errors from the database)
- the import is splitted into three steps:
  - beforeImport
    --> prepares the data to import, sorts out relations (roles, tags), detects fields (for LTS)
  - doImport
    --> does the actual import
  - afterImport
    --> updates the data after successful import e.g. update all user reference fields e.g. published_by (compares the imported data with the current state of the database)
- import images: markdown can be null
- show error message when json handler can't parse file
- do not request gravatar if email is null
- return problems/warnings after successful import
- optimise warnings in importer
- do not return warnings for role duplications, no helpful information
- error handler: return context information of error
- we show the affected json entries as one line in the UI
- show warning for: detected duplicated tag
- schema validation: fix valueMustBeBoolean translation
- remove context property from json parse error
2017-05-23 17:18:13 +01:00
..
adapters 🎨 Move scheduling and storage in adapters/ (#8435) 2017-05-15 12:52:01 +02:00
admin grunt dev admin livereload (#8176) 2017-03-30 13:27:07 +01:00
api 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
apps 🐝 Allow unbalanced HTML in markdown card. (#8320) 2017-05-23 16:15:32 +02:00
auth 🚑 Disable remote authentication (#8346) 2017-04-24 18:56:49 +01:00
blog 🎨 Move scheduling and storage in adapters/ (#8435) 2017-05-15 12:52:01 +02:00
config ️ Throw clear error message when config.url has no protocol (#8466) 2017-05-21 18:00:11 +02:00
controllers/frontend Posts per page as theme-config (#8149) 2017-03-14 18:03:36 +01:00
data 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
events post-scheduling 2016-06-14 10:52:13 +02:00
helpers 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
mail 🐛 escape blog title for mail header (#8453) 2017-05-12 15:09:45 +02:00
middleware 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
models 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
permissions 🐛 fix invite permissions for editor (#7889) 2017-01-25 12:07:31 +00:00
public 🎨 Use svg icons in default templates (#8343) 2017-05-15 13:43:58 +02:00
settings 🎨 settings inconsistency (#8381) 2017-04-24 18:41:00 +01:00
themes 🎨 Move scheduling and storage in adapters/ (#8435) 2017-05-15 12:52:01 +02:00
translations 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
utils 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
views Asset amends (#8294) 2017-04-10 11:30:21 +02:00
app.js 🐛 Fix the config for compression (#8226) 2017-04-03 10:58:07 +02:00
errors.js 🛠 use Ignition for logging/errors (#7869) 2017-01-23 11:04:01 +00:00
filters.js Misc grunt /dev updates 2015-05-28 20:25:14 +01:00
ghost-server.js Theme loading part 1 (#7989) 2017-02-22 00:26:19 +01:00
i18n.js 🎨 settings inconsistency (#8381) 2017-04-24 18:41:00 +01:00
index.js 🎨 Move scheduling and storage in adapters/ (#8435) 2017-05-15 12:52:01 +02:00
logging.js 🐛 forward missing logging config: rotation 2017-02-17 18:24:14 +01:00
overrides.js 🛠 update lodash,knex and bookshelf to latest versions 2016-09-26 10:20:55 +02:00
update-check.js 🎨 settings inconsistency (#8381) 2017-04-24 18:41:00 +01:00