Code Monkey home page Code Monkey logo

ezplatform-xmltext-fieldtype's Introduction

XmlText field type for eZ Platform

Build Status Downloads Latest release License

This is the XmlText field type for eZ Platform. It was extracted from the eZ Publish / Platform 5.x as it has been suceeded by docbook based RichText field type.

Note: This Field Type supports editing via Platform UI v1, however only as raw (simplified) xml. There has currently not been any attempts at getting Online Editor from legacy extension to work with within Platform UI, to do that among other things someone would need to port the custom html to xml handler from oe extension to this field type. So this Field Type is mainly meant for use for migrating to RichText, see below.

Installation

NOTE: This package comes already bundled with Legacy Bridge. However if you would rather like to 1. migrate your content directly to eZ Platform to take full advantage of it, or 2. otherwise don't want to use legacy but need this field type for some legacy content usage within pure eZ Platform setup, then run the following:

composer require --update-with-all-dependencies "ezsystems/ezplatform-xmltext-fieldtype"

And lastly enable the bundle by adding new EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle(), to app/AppKernel.php list of bundles.


Once you have migrated your content you can remove the bundle from both app/AppKernel.php and composer.json.

Migrating from XmlText to RichText

Warning: As of 1.6 this is now fully supported, but regardless of that always make a backup before using the migration tools.

This package provides tools to migration existing XmlText fields to RichText, the enriched text format eZ Platform uses. The tool comes as a Symfony command, ezxmltext:convert-to-richtext.

It will do two things:

  • convert ezxmltext field definitions to ezrichtext field definitions
  • convert ezxmltext fields (content) to ezrichtext

We recommend that you do a test run first using something like:

php app/console ezxmltext:convert-to-richtext -v --concurrency=2 --dry-run

The -v flag will output logs to the console, making it easy to track the conversion work that is being done. This is an example of a successful conversion log entry for one field:

[2016-02-03 15:25:52] app.INFO: Converted ezxmltext field #745 to richtext {"original":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section xmlns:image=\"http://ez.no/namespaces/ezpublish3/image/\" xmlns:xhtml=\"http://ez.no/namespaces/ezpublish3/xhtml/\" xmlns:custom=\"http://ez.no/namespaces/ezpublish3/custom/\"/>\n","converted":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:ezxhtml=\"http://ez.no/xmlns/ezpublish/docbook/xhtml\" xmlns:ezcustom=\"http://ez.no/xmlns/ezpublish/docbook/custom\" version=\"5.0-variant ezpublish-1.0\"/>\n"}

It contains, in a JSON structure, the original (ezxmltext) value, and the converted (ezrichtext) value that has been written to the database.

Once you are ready to convert, drop -v and --dry-run.

ezplatform-xmltext-fieldtype's People

Contributors

adamwojs avatar andrerom avatar bchoquet-heliopsis avatar bdunogier avatar beberlei avatar blankse avatar crevillo avatar damianz5 avatar dpobel avatar emodric avatar gabriperego avatar itagent avatar joekepley avatar juanolon avatar kmadejski avatar lolautruche avatar marioblazek avatar masev avatar natanael89 avatar nattfarinn avatar patrickallaert avatar pborreli avatar pedroresende avatar peterkeung avatar plopix avatar pspanja avatar stephanediot avatar tobys avatar vidarl avatar yannickroger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.