Closed jpmschuler closed 4 years ago
You mean you switched to another DS for a given TmplObj? Something I wouldn't do ATM. :-D
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.
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).
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).
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. ;)
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?
Of course that's fine
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: