Bug #98333
openInconsistent behavior while saving content elements with *required* fields
0%
Description
Summary
If you edit an element with required fields and click the normal save button (in the top headerbar), you can get an alert which says that some are not correctly filled. But with the save and view button, you can bypass the whole check and leave the element broken in place. The Fluid code has not always a check if such a field is not given – we would rely on the backend to prevent this.
I tested it with the "Categorized content" element, the Selected categories field is required. But I think every element with required fields has problems.
Expected behavior
The "Save and view" button gives the same alert message as the normal one – preventing to save the element.
Actual behavior
The "Save and view" button bypasses the expected behavior and saves/shows the element in a new tab.
- v11.5.15
- v10.4.31
- v9.5.31
- (maybe also v12 or older versions than v9 – I didn't test them)
Files
Updated by Andreas Kienast over 1 year ago
- Status changed from New to Needs Feedback
Hey, thank you for your report. TYPO3 doesn't have a "Save & View" button anymore since v10, IIRC. Do you by chance have a 3rd party extension installed that re-implements this feature?
Updated by Julian Mair over 1 year ago
- File Screenshot from 2023-08-04 09-16-13--copy.png Screenshot from 2023-08-04 09-16-13--copy.png added
- File Screenshot from 2023-08-04 09-16-33--copy.png Screenshot from 2023-08-04 09-16-33--copy.png added
Hey Andreas, no there is no 3rd party extension - this comes from the core. I append 2 screenshots to explain it a bit better. If you have more questions, feel free to ask. Thanks.
Updated by Andreas Kienast over 1 year ago
Alright, thank you for your clarification. I was under the assumption you meant the old "Save & View" button.
Updated by Riccardo De Contardi 5 months ago
I tried to perform a test on TYPO3 13 but I am unsure if my test is correct:
1) I added on a page a “Form engine - required“ record
2) without saving it I clicked on “view” button
A modal “You currently have unsaved changes. You can either discard these changes or save and view them.” opens
I clicked on the button “Save changes and view”
Result¶
- The browser opens a new tab, but it is stuck on a about:blank page
- TYPO3 backend shows an alert modal: “The fields marked with an exclamation mark are not yet correctly filled in. Please complete them properly.”
Is this test sufficient or a different test is necessary?
Updated by Julian Mair 5 months ago · Edited
Hey Riccardo, this test is perfect. I followed the same steps in TYPO3 v12 (and older), and it behaved as described in the issue. Unfortunately, I don't have a v13 available to test, but I'm glad this is now fixed. Do you know the corresponding issue/review link for this fix by any chance?
Thanks!
Updated by Gerrit Code Review 17 days ago
- Status changed from Needs Feedback to Under Review
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83837
Updated by Gerrit Code Review 17 days ago
Patch set 4 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83838
Updated by Gerrit Code Review 1 day ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83837
Updated by Gerrit Code Review about 11 hours ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83837
Updated by Gerrit Code Review about 9 hours ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83837