T3Voila / templavoilaplus

TYPO3 Extension TemplaVoilà! Plus for TYPO3 8/9/10/11/12 LTS
https://extensions.typo3.org/extension/templavoilaplus/
GNU General Public License v2.0
26 stars 27 forks source link

Update pages.tx_templavoilaplus_ds and tt_content.tx_templavoilaplus_ds if tx_templavoilaplus_tmplobj.datastructure is updated #178

Closed jpmschuler closed 4 years ago

jpmschuler commented 6 years ago

In case the option basic.enable.selectDataStructure is off (DEPRECATED will be default with 8):

In case you change the DS of a TV+ TmplObj (e.g. for preparing updates, for adding a new field to a template, etc) only the TmplObj is changed. However all Pages (or tt_content if it's an FCE) are still referencing the TmplObj and the old DS resulting in the output not being changed until every single record is saved.

The BE-Form hook should be used for tx_templavoilaplus_tmplobj if field datastructure is updated that updates all respective pages or tt_content records.

Additional Notes:

opi99 commented 6 years ago

You mean you switched to another DS for a given TmplObj? Something I wouldn't do ATM. :-D

jpmschuler commented 6 years ago

I do that quite often actually while migrating ;-) E.g. currently all editors have a page DS main content + sidebar. The new template has an additional footer. Now I create a DS with a new field for the update path (e.g. for a preview of the new template with old content using .childTemplate e.g.

The real reason however is that I am refactoring a whole lot of templates into sitepackage-Extensions, thus moving and renaming the DS without actually changing it's content. Basically one could remove the datastructure field everywhere, but I think that is a core requirement, so we are stuck with it.

opi99 commented 6 years ago

Hmmm, I hope that changing the DS won't lead to FlexForm Loading errors (the new FlexForm code in core is very fragile at that point).

jpmschuler commented 6 years ago

That's the reason for this request. If I change DS (preserving the fields) I get FlexForm loading errors; If I mySQL-override all tt_content/page with the new DS everything is fine. Done that since v6, works flawlessly in v7. Dunno why v8 should be picky there.

With TV(+) every TO has a fixed DS, thus the DO-field is not really necessary in tt_content and pages and only there, because the core FlexForm loading expects it.

As it is an on-field-update-event basically it should never be fired (except for me as it seems).

opi99 commented 6 years ago

I thought in v6.2 and v7 this isn't necessary. Maybe we talk about two different things. Let us speak on Slack in the next days ... in native language. ;)

opi99 commented 4 years ago

I would like to close this one. 1) It's a feature for the 7.x line of TV+ which I like to have only in maintenance mode yet 2) In the 8.x line we will have a complete new way and this isn't needed anymore (hopefully) Is it ok for you?

jpmschuler commented 4 years ago

Of course that's fine