Ghost: Import fails for exports with 'force_i18n validation' error

Created on 7 Mar 2019  路  2Comments  路  Source: TryGhost/Ghost

Issue Summary

Import fails for exports from the same Ghost instance with following validation error:
screenshot from 2019-03-07 15-20-25

Validation (isIn) failed for force_i18n

{
"key":"force_i18n",
"value":"0",
"type":"blog",
"created_at":"2019-03-07T06:46:28.000Z",
"updated_at":"2019-03-07T06:52:14.000Z"
}

To Reproduce

  1. Set up a regular Ghost instance
  2. Go to 'General' page and click 'Save settings' button
  3. Go to 'Labs' and click 'Export'
  4. Click 'Import' and use just created export file
  5. Import fails with validation error mentioned in the summary

Importing should always work for exports from the same Ghost version

Technical details:

Error visible in console:

ERROR [2019-03-07 06:52:28] "POST /ghost/api/v2/admin/db/" 422 1429ms

Validation (isIn) failed for force_i18n

"{\"key\":\"force_i18n\",\"value\":\"0\",\"type\":\"blog\",\"created_at\":\"2019-03-07T06:46:28.000Z\",\"updated_at\":\"2019-03-07T06:52:14.000Z\"}"
Error ID:
    92ccfd40-40a5-11e9-8e70-95a8cf9a4282

----------------------------------------

ValidationError: Validation (isIn) failed for force_i18n
    at new ValidationError (/home/gargol/workspace/ghost/Ghost/node_modules/ghost-ignition/lib/errors/index.js:121:23)
    at each (/home/gargol/workspace/ghost/Ghost/core/server/data/validation/index.js:348:35)
    at /home/gargol/workspace/ghost/Ghost/node_modules/lodash/lodash.js:4911:15
    at baseForOwn (/home/gargol/workspace/ghost/Ghost/node_modules/lodash/lodash.js:2996:24)
    at /home/gargol/workspace/ghost/Ghost/node_modules/lodash/lodash.js:4880:18
    at Function.forEach (/home/gargol/workspace/ghost/Ghost/node_modules/lodash/lodash.js:9344:14)
    at validate (/home/gargol/workspace/ghost/Ghost/core/server/data/validation/index.js:320:7)
    at Object.validateSettings (/home/gargol/workspace/ghost/Ghost/core/server/data/validation/index.js:285:52)
  • Ghost Version: 2.16.4
api bug server / core

Most helpful comment

Importer is a labs feature (experimental). IMO we can release the fix and the enhancements #10585 on Tuesday. The import is only broken if you export on 2.16 and import on 2.16. I will add a note on the release.

All 2 comments

Importer is a labs feature (experimental). IMO we can release the fix and the enhancements #10585 on Tuesday. The import is only broken if you export on 2.16 and import on 2.16. I will add a note on the release.

Yes, I had the same issue to with 2.16.4
Upgrading fixed the problem.

Was this page helpful?
0 / 5 - 0 ratings