eZ Community » Forums » eZ Publish 5 Platform » Custom datatype migration
expandshrink

Custom datatype migration

Custom datatype migration

Monday 22 July 2013 3:06:14 pm - 5 replies

Hi, I need to make my cool extension work in eZ5.x. Obvious first step was to install latest eZ Community version (2013.6) and enable my extension. Everything went surprisingly fine (I even managed to install the package with content class created for 4.7), until I created the content object (containing my custom attribute) and fired the front page. Following exception is thrown:

An exception has been thrown during the rendering of a template ("Could not find 'eZ\Publish\SPI\Persistence\Content\FieldValue\Converter\*' with identifier 'form'"blunk.gif Emoticon in "{% extends "eZDemoBundle::pagelayout.html.twig" %}
{% block content %}
{{ viewResult|raw }}
{% endblock %}".

When I try to open the node directly (by typing it's name in URL) exception is different:

Could not find 'Content' with identifier 'array (
'id' => 57,
'languages' => NULL,
'versionNo' => 1,
)'

I guess I need to convert my datatype into eZ5.x format, but I'm not sure about that. If so, please give me instruction/tutorial how to do that. If not, give me a clue what to do in that case.

Monday 22 July 2013 6:15:33 pm

Hi Piotr

You indeed need to rewrite your datatype as a valid eZ5 fieldType.

The documentation about this is available on our Confluence documentation site.

Cheers happy.gif Emoticon

Monday 22 July 2013 7:12:25 pm

Hi Jerome, thanks for the reply. I will read the article and probably decide to rewrite the datatype, however I had a hope that there will be some kind of structure mapping. Please put some input also on my additional questions:

  1. How to maker sure that extension containing such datatype/fieldType will work on both 4.7 and 5.x (without duplicating the code)?
  2. As far as I understand, a class based on eZDataType should be removed, right?
  3. What about custom fetch functions, so I also need to rewrite it?

Monday 22 July 2013 9:29:04 pm

As of now there's no clear-cut guideline for an extension providing both ez-4 and ez-5 capability.

Of course isolating most of the business logic in custom classes and only leaving "glue" code transforming it to eZ apis helps, but you will most likely need 2 separate top-level dirs (bundle and ez4 extension).

Last thing: right now editing interface is still eZ4-based, so you need to have available both datatype versions.

Monday 22 July 2013 9:42:34 pm

OK. In that case, can you give me an approximate date (month, half a year, two years?) when admin interface will be rewritten in Symfony2 way? I assume that after that there will be no need to use old datatypes at all. I need to know that, to ensure if it's worth waiting with updating my extension.

Would be great if you could introduce brand new admin panel on eZSummerCamp happy.gif Emoticon

Tuesday 23 July 2013 2:57:13 pm

We will most likely show of some UI at summercamp, but currently it is scheduled to be finalized and included in eZ Publish Platform 5.3 (May 2014), so until then you kind of need to care about both kernels to some extent.

If you don't need to use your datatype (FieldType) in 5.x input/output, then you can define it as "Null Type", which will ignore the values and avoid the exception.

Modified on Tuesday 23 July 2013 2:57:38 pm by André R

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from