Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

Streamline InlineHelper->addIrreToData introduced 8.0.4 results in array becoming an integer #634

Closed janus-reith closed 4 months ago

janus-reith commented 4 months ago

Some change introduced in 8.0.4 causes the repeating field on Page Templates to not be filled for me anymore

This was probably caused by "[BUGIFX] Streamline InlineHelper->addIrreToData": https://github.com/Gernott/mask/commit/c6c80e3dc30f9dac07e3477d8dc7159d6f24d87f

I have a page template "Default":

mask

The backend layout for this still renders fine and I can configure these items on my pages. Rendering in the frontend however fails.

In versions up to v8.0.3, data.tx_mask_slideritems was an array and I could iterate over the items. Starting with v8.0.4, data.tx_mask_slideritems became an integer, presumably with the length of array items, 4 in my case.

janus-reith commented 4 months ago

I just tested with different new values, it seems like for page templates, any kind of field within the repeating field are not actually resolved in the template but the item length is returned.

But since that was introduced in 8.0.3 already and seems like a common usecase, I have the impression that there must be something I'm missing.

nhovratov commented 4 months ago

@janus-reith Hi, thanks for reporting the issue. You were correct by pinpointing to the commit. It wrongly did an early return, if CType was not set. However, it is only needed for tt_content records.

nhovratov commented 4 months ago

But since that was introduced in 8.0.3 already and seems like a common usecase, I have the impression that there must be something I'm missing.

I'm too quite surprised no one raised an issue in 1.5 years. This feature is very niche and even less people use inline relations there. Still, there are so many users it must have caused problems before.

janus-reith commented 4 months ago

Awesome, works like a charm now - Thanks a lot for the quick fix!

I'm too quite surprised no one raised an issue in 1.5 years. This feature is very niche and even less people use inline relations there. Still, there are so many users it must have caused problems before.

A bit puzzling indeed