contextualcode / ezplatform-xmltext-fieldtype
XmlText field type implementation for eZ Platform
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 29
Type:ezplatform-bundle
Requires
- php: ^7.3
- ext-dom: *
- ext-xsl: *
- ezsystems/ezplatform-content-forms: ^1.0
- ezsystems/ezplatform-rest: ^1.0
- ezsystems/ezplatform-richtext: ^2.0
- ezsystems/ezpublish-kernel: ^8.0
Requires (Dev)
- ezsystems/ezplatform-solr-search-engine: 3.0.x-dev
- friendsofphp/php-cs-fixer: v2.14.2
- matthiasnoback/symfony-dependency-injection-test: ^4.0
- phpunit/phpunit: ^8.4
Conflicts
- phpunit/phpunit: 8.4.0
- dev-master / 2.0.x-dev
- v2.0.0-beta1
- v1.9.1
- v1.9.0
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- 1.7.x-dev
- v1.7.3
- v1.7.2
- v1.7.1
- 1.7.0
- v1.6.2
- v1.6.1
- v1.6.0
- v1.6.0-rc1
- v1.6.0-beta1
- v1.5.1
- v1.5.0
- v1.5.0-rc1
- v1.4.0
- v1.3.0
- 1.2.x-dev
- v1.2.1
- v1.2.0
- v1.2.0-rc1
- 1.1.x-dev
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.1.0-rc1
- v1.0.0
- v1.0.0-rc1
- 1.0.0-beta2
- 1.0.0-beta1
- 0.1.0
- dev-test_tests
- dev-commands_exit_status_code
- dev-fix_commands_exit_status_code
- dev-fix-custom-align
- dev-generate_custom_tags_config
- dev-fix-nested-embeds
- dev-fix_custom_tag_align
- dev-pull-request-template
- dev-custom_attributes
- dev-use-richtext-validator
- dev-disable-inline-customtag-warning
- dev-allow-override-richtext-converter
- dev-fix_ezp29846
- dev-tmp_mastermerge
- dev-dbal
- dev-converter_cleanup
- dev-release-rc
This package is not auto-updated.
Last update: 2024-12-21 12:35:13 UTC
README
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 / Admin UI v2, 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 toezrichtext
field definitions - convert
ezxmltext
fields (content) toezrichtext
We recommend that you do a test run first using something like:
php bin/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
.