Project

General

Profile

Actions

Bug #36660

open

TCA type-field and required fields bypass

Added by Viktor Livakivskyi almost 12 years ago. Updated about 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2012-04-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I'm using a TCA type-feature, when some table contains so called "type-field",
which defines different views of same record at BE.

Let's see following cases of type-switching:
1. Record is already existing, field is required and it's content was changed
- switching type saves the field and reloads the form;
2. Record is already existing, field is required and it's content was set to empty
- switching type doesn't save the field, reloads the form and restores previous field's value;
3. Record is new, field is required, and it's content is set to something
- switching type saves the record with field's value and reloads the form;
4. Record is new, field is required, but not filled with anything
- switching type saves the record with empty required field.

As you see, we have a problem in item 4, since user can bypass a required field validation, and it may break a logic of application, which requires some fields to be filled with something.

Actions #1

Updated by Björn Pedersen almost 12 years ago

Yes, the saving during switching is sometimes a problem. One idea would be to create a temporary versioned record and automatically switch that record oce a real save is done.

Actions #2

Updated by Mathias Schreiber over 9 years ago

  • Category set to FormEngine aka TCEforms
  • Target version set to 7.4 (Backend)
  • Is Regression set to No
Actions #3

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #4

Updated by Benni Mack over 8 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #5

Updated by Mathias Schreiber over 8 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

This is pretty hard to implement (if not impossible).

Reasoning is that you could have two types with different sets of required fields.

But: Would it be sufficient if we denied switching a type field until all mandatory fields have been filled in?

Actions #6

Updated by Viktor Livakivskyi over 8 years ago

Would it be sufficient if we denied switching a type field until all mandatory fields have been filled in?

It can be applied as a workaround, if there is no way to not store a record, when type switches.

The only downside I see here: user accidentally chose wrong type with lot of required fields. So, to select a correct type, he needs to fill all these fields with some dummy data to be able to switch.

Actions #7

Updated by Mathias Schreiber over 8 years ago

  • Target version changed from 7 LTS to Candidate for Major Version
Actions #8

Updated by Alexander Opitz almost 8 years ago

  • Status changed from Needs Feedback to New
  • Assignee deleted (Mathias Schreiber)
Actions #9

Updated by Jan Kornblum about 3 years ago

  • TYPO3 Version changed from 4.7 to 10
  • PHP Version changed from 5.3 to 7.2

Still a problem, especially when working with single table inhertiance.

+1 for the workaround from matthias schreiber.

Another workaround might be: Highlight (warning) "invalid" records in "weblist" module. So the editors at least can easily identify invalid records.

Actions

Also available in: Atom PDF