Path

ez.no / exponential / documentation / development / extensions / datatypes / new datatype / datatype troubles / hints


datatype troubles / hints

Hi,

I spent some hours to find out, what is going wrong with my installation. I am using two self created datatypes which worked before, but since I've upgraded to 3.4-alpha1 they failed with fatal erros. Or to say it in a better way: The loading of the datatypes failed because the system couldn't find the files anymore.

I made a small error which has an great impact.
The ezdatatype class tried to load the file "ezgwftextlinetypetype.php" in my extension dir. which doesn't exist. The filename is ezgwftextlinetype.php. I searched all files to find out why (the hell) the system is searching after "*typetype.php" instead of "*type.php". Finally I found my error:

The first line of my custom datatype was:
define( 'EZ_DATATYPESTRING_GWFTEXTLINE', 'ezgwftextlinetype' );

and the system stored this name in the db (table ezcontentclass_attribute).

After changing the table-entry and the first line to
define( 'EZ_DATATYPESTRING_GWFTEXTLINE', 'ezgwftextline' );

it worked again.

The very strange thing: As I said in the former system this user-error won't have any effect and my custom datatype worked.

Kind regards,
Emil.