flux icon indicating copy to clipboard operation
flux copied to clipboard

[BUGFIX] Allow deleting hidden content elements

Open cweiske opened this issue 3 years ago • 1 comments

Deleting content elements that are restricted in some way (hidden, starttime, endtime, fe_group) is broken since commit

[BUGFIX] Prevent error when moving/pasting content with deleted child

That commit was meant to fix a problem with deleted content elements. This commit here actually only filters deleted elements instead of all.

Resolves: https://github.com/FluidTYPO3/flux/issues/1939

cweiske avatar May 18 '22 14:05 cweiske

What to do to get this released?

develth avatar Jul 26 '22 07:07 develth

We also face an issue regarding the error in #1963 furthermore, the error also occurs when translating hidden elements.

Can you rewiew this patch in order to have it included in the extension ?

lucmuller avatar Sep 02 '22 12:09 lucmuller

This would break the undelete command in DataHandlerSubscriber (triggered when you restore an element from Recycler). The method getSingleRecordWithoutRestrictions was intentionally introduced to allow loading records completely without restrictions, including deleted records. So we need a different approach here.

I've pushed b1d352e45de76c89185b3f77bf6da4319006deaf which aims to solve the same issue without changing the functionality of getSingleRecordWithoutRestrictions. If you can confirm that it solves the issue, it would be great if you could close the PR/issues ;)

Strike that - I see now that this restriction is changed in getSingleRecordWithRestrictions and not in getSingleRecordWithoutRestrictions so it would not break the undelete command. You're completely right that the "with restriction" command shouldn't respect start/endtime/hidden etc. restrictions.

NamelessCoder avatar Oct 17 '22 13:10 NamelessCoder