This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » new datatype issues

new datatype issues

new datatype issues

Tuesday 04 October 2011 10:54:45 am - 4 replies

hi there,

i created a new datatype.. for the moment, it doesn't do anything, but i can't continue developing because i get always the same error:

PHP Fatal error:  Call to a member function attribute() on a non-object in /www/kernel/classes/ezcontentobjectattribute.php on line 505, referer: http://<domain>/ezadmin/class/classlist/5

i was looking for this error, and i found that my datatype doesn't have the attribute  contentclass_attribute_name..

this attribute will called from the file lib/eztemplate/classes/eztemplateattributeoperator.php (175)

any help?

Tuesday 04 October 2011 4:17:14 pm

Hello Juan,

I'm sorry your having trouble.

What existing datatype are you using as a basis for your custom datatype?

Perhaps this article on creating custom datatypes will help?

I hope this helps ...



Tuesday 04 October 2011 4:29:05 pm

hi Heath,

actually, i was using this tutorial for reference. unfortunately the source code's are offline, i also looked for reference at the ezsurvey, ezflow and other natives datatypes.


Wednesday 05 October 2011 6:32:52 am

Hello Juan,

Apologies, I did not realize this before I shared this article.

I have attempted to contact the author Thomas and request the publication of the missing source code but I fear that too much time has passed and this may be another example lost in the internets. (Read his blog and find he seems to have moved beyond php)

This should serve as a real example of why it is often better for the community if example source code like this is published on instead of personal revision control hosting sad.gif Emoticon

I would also consider reviewing the available datatypes published on, re:

I would prolly start the learning process by creating a very simple but custom copy of a very simple base datatype. Say like ezboolean, ezstring, ezinteger or even the differences between ezdate and ezdatetime. Those are what I think of when I think of simple getting started datatypes. And those are quite simple to copy customize and re-use as a basis for your own custom datatype. This way you know it works just like a native datatype + your additions. They really help you start from something which you can rest assured works right out of the box.

I've done this myself many times for specific customer request which required them (they are old but they are still online).


It might also help to review the core datatype PHP doxygen documentation,


Pay close attention to observing eZ Publish PHP standards, conventions and patterns.

These conventions and patterns (php class name, settings, etc) are key to ensuring your datatype is detected and used properly. 

I hope this helps...



Wednesday 05 October 2011 9:26:30 am

hi again,

i still don't find the error, but i have done a new datatype (as you recommended) wich only save the object_id, and it works..

thanks for the help



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

36 542 Users on board!

Forums menu

Proudly Developed with from