core icon indicating copy to clipboard operation
core copied to clipboard

Revisit ContentTypeImportExportUtil for new ContentTypes

Open dsilvam opened this issue 9 years ago • 7 comments

Code here needs to change: https://github.com/dotCMS/core/commit/09c0d311da5c0fcbe8cc17314f8666717fb11710#diff-6f5be13b3de23ad695770ff9f6acd009

  • Don't use FieldsCache
  • contentType.fields() should get all the fields
  • use contentType to json functionality (ask @wezell )

dsilvam avatar Feb 14 '17 15:02 dsilvam

PR Core: https://github.com/dotCMS/core/pull/11503

agomez-dotcms avatar May 05 '17 20:05 agomez-dotcms

Note to QA: please generate a new starter with new content types included and then load the new starter from an empty db

dsilvam avatar May 08 '17 15:05 dsilvam

PR for 4.1: https://github.com/dotCMS/core/pull/11520

dsilvam avatar May 08 '17 16:05 dsilvam

Passed QA.

  • Generated new content types and added new content to those content types.
  • Then generated a new starter with new content types (and contents) included and then loaded the new starter from an empty db: The new content types are showing successfully
  • New contents were also created in different language than default and they are showing with new starter.

Tested locally in master-4.1 / commit 6b3ae069404821f907d4ff7bd8e663d810693ea7 Mac OS 10.10 / MySQL 5.6.35 / Firefox v45.0.1 / Tomcat 8 / Java 8

shaydotcms avatar May 08 '17 21:05 shaydotcms

Use field.variables() instead of reloading variables

wezell avatar May 11 '17 20:05 wezell

In fact - @agomez-dotcms we might want to make this method private or protected to prevent it from being used outside the ContentType's instantiation/hydration. Thoughts?

APILocator.getContentTypeFieldAPI().loadVariables(ff)

wezell avatar May 11 '17 21:05 wezell

PR Core: https://github.com/dotCMS/core/pull/11557

agomez-dotcms avatar May 11 '17 23:05 agomez-dotcms