contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

Cannot modify fields with onload_callback #4

Closed Toflar closed 9 years ago

Toflar commented 9 years ago

The onload_callback does not seem to be considered in the Installer or the DcaExtractor, that's why field modifications there are not being considered.

leofeyer commented 9 years ago

This is the same behavior as in Contao 3, isn't it?

Toflar commented 9 years ago

Not sure but if it is, then I guess it should be fixed. What's your opinion?

leofeyer commented 9 years ago

I'm not sure. Is it a bugfix? If yes, how will it affect the existing extensions?

Toflar commented 9 years ago

Well the changes are quite obvious. Right now you cannot modify sql definitions by anonload_callback because the Installer ignores it. Either the users have always been wondering why this is and found other solutions (like the loadDataContainer hook) or they've just never tried. It is actually a bug fix but it can potentially cause issues if somebody relied on the fact that onload_callbacks are not executed during DB update mode (which is obviously not API, so we can change it).

I guess we have to balance pros and cons here... @contao/developers

discordier commented 9 years ago

Wait a sec, you want to modify the SQL information when a "model" is loaded? What the hell is that for an usecase?

leofeyer commented 9 years ago

As discussed on Mumble on October 14th, this ticket can be closed.