Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricting both TcaColPosItems and TcaCTypeItems results in un-editable content => solve by showing the real current values as 'invalid' #134

Open
netcoop opened this issue Apr 5, 2023 · 1 comment · May be fixed by #135 or #146

Comments

@netcoop
Copy link

netcoop commented Apr 5, 2023

Having both TcaColPosItems and TcaCTypeItems automatically restricted to the allowed values results in uneditable content if there already is content that is not allowed in that column, e.g. because the BE-layout of the page has been changed.

If you try to edit the content in order to make it fit, it will show the wrong CType (it shows the first allowed type for THIS column), but it does not shows this column in the colPos list (only the ones where the real CType of this content is allowed). You can not change the CType to an allowed value, because now the colPos is wrong, but you cannot change the colPos back either.

The solution would be not to remove the current value from the colPos options, but rather keep it, maybe marked as an [Invalid value] which will then automatically change back to the (same) original value without the remark as soon as the record is saved with a new, allowed CType (like DataHandler already does with invalid field values).

Btw: v3.3.0, TYPO3 v11.5.25, no container or grid-elements

@netcoop
Copy link
Author

netcoop commented Apr 6, 2023

I would propose to keep the current values of all possibly restricted fields (CType, colPos and list_type), just like the core does in case of an invalid field value. This will keep the not-allowed records editable (to make them meet the restrictions), and it is less confusing for editors (now they can see e.g. the TCEform for a plugin while the CType says 'textmedia' or whatever).

I will create a PR

@netcoop netcoop changed the title Restricting both TcaColPosItems and TcaCTypeItems results in un-editable content Restricting both TcaColPosItems and TcaCTypeItems results in un-editable content => solve by showing the real current values as 'invalid' Apr 6, 2023
netcoop added a commit to netcoop/content_defender that referenced this issue Apr 6, 2023
Instead of removing invalid options from the selectors, keep them in
if it is the value of the current record, but label them as 'invalid'.

Fixes IchHabRecht#134
netcoop added a commit to netcoop/content_defender that referenced this issue Apr 11, 2023
Instead of removing invalid options from the selectors, keep them in
if it is the value of the current record, but label them as 'invalid'.

Fixes IchHabRecht#134
netcoop added a commit to netcoop/content_defender that referenced this issue Aug 16, 2023
Instead of removing invalid options from the selectors, keep them in
if it is the value of the current record, but label them as 'invalid'.

Fixes IchHabRecht#134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant