Skip to content

Using core importer routines to import pages/stacks/global areas? #45

@mlocati

Description

@mlocati

The core is able to export and import pages/stacks/global areas in CIF format.

When the Migration Tool (MT for short) is used to export the data to a CIF file, it uses the core functions.

But when MT is used to import data from a CIF file, it extracts the info it contains, and executes some code that's almost the same as the one we already have in the core.

Instead of maintaining the same code twice (both in the core and in the migration tool), what about the following approach?

  1. when MT reads the elements of the CIF file (for example, a <page> element) it still extracts some details (eg for checking if there are problems and for showing the users some info about the stuff being imported).
  2. instead of extracting every data from CIF, MT stores the whole XML element (eg, the <page> element with all its attributes and child nodes)
  3. instead of running some code like this, we create a SimpleXML element on the fly and pass it to the core functions (like this)

Other importers (like the one that imports data from WordPress) can simply create the XML with the data being imported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions