contao-community-alliance / meta-palettes

Dynamic configured palettes for contao.
6 stars 8 forks source link

Hotfix for conflicts of DcGeneral and meta palettes #23

Closed dmolineus closed 9 years ago

dmolineus commented 10 years ago

Avoid model updating because newes dc general does not provide a getCurrentModel method anymore: EnvironmentInterface

tristanlins commented 10 years ago

The class MetaPalettes should not be used with the latest dc general 2.x, the class MetaPalettesBuilder should be used?!

dmolineus commented 10 years ago

If the datacontainer is defined as General you are absolutely right. I have a bit more advanced use case. ;)

I'm currently rewrite my DcaTools library to use the dc general 2.x. I'm providing some features which are part of the dcg to the original Contao drivers. One thing I add are event based callbacks. Instead of writing my own events I use the dc general events for it.

That's why I create an DcGeneral data definition for dca which are actually non General one. This works surprisingly pretty well so far. But not with metapalettes. ;)

tristanlins commented 10 years ago

Okay, this is the DCG 1.x compatibility code... and it's not designed to work with DCG 2.x like this way. Can't you overwrite the driver in the DCA before loading the DCG?

discordier commented 9 years ago

I guess this can be safely closed. The issue is not present anymore in actively maintained branches.