You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using custom templates for the backend preview of my mask elements.
In these previews I'm also showing the nested/child elements.
Now if any element has nested elements, the preview works fine.
Example:
But if I hide a nested record, it'll disappear but it shows up in the edit view. (it is not deleted):
I've searched through the code and found why this does not work.
Inside the InlineHelper class I've found this line which checks if we are in work space preview mode:
But in the page module the workspace id is 0. So changing the condition to $workSpaceId >= 0; will then remove the querybuilder restrictions some lines later.
Then in this line the condition for the disabled field had to be removed in order not continue the loop.
@Wintermilch I had the false assumption back then that hidden records should not be displayed in backend previews. This is now fixed.
NOTE: This does not happen if nested element is from tt_content table.
Yes! This is because they are handled differentely (better) than Inline fields. This should ideally be unified so everything behaves identically. This is a very legacy part of the Mask Code. However, my focus is currently on Content Blocks and I won't be doing larger refactorings of the Mask Code for the forseeable future.
Using TYPO3 12.4.10 and Mask 8.3.8
I'm using custom templates for the backend preview of my mask elements.
In these previews I'm also showing the nested/child elements.
Now if any element has nested elements, the preview works fine.
Example:
But if I hide a nested record, it'll disappear but it shows up in the edit view. (it is not deleted):
I've searched through the code and found why this does not work.
Inside the InlineHelper class I've found this line which checks if we are in work space preview mode:
mask/Classes/Helper/InlineHelper.php
Line 264 in ead5ddb
But in the page module the workspace id is 0. So changing the condition to
$workSpaceId >= 0;
will then remove the querybuilder restrictions some lines later.Then in this line the condition for the disabled field had to be removed in order not continue the loop.
mask/Classes/Helper/InlineHelper.php
Line 309 in ead5ddb
With these 2 adjustments, my preview works fine again:
NOTE: This does not happen if nested element is from tt_content table.
The text was updated successfully, but these errors were encountered: