Project

General

Profile

Actions

Bug #64189

closed

Bug with displayCond in TCA in draft mode

Added by Mohamed Rebai almost 10 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-01-08
Due date:
% Done:

0%

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

Description

Hi,

This bug is a little bit complicated to explain (and sorry in advance for my poor english)

I created with extension builder and extension, with two tables. Table 1 is persons, table 2 is events. One person can have many events, so in the form of an event record, i can choose a person record.
In the event record form, i have a lot of fields, there is a checkbox, that when changed, the form reload and display other fields. To do that i use displayCond in the TCA definition.

Now here is two scenarios, in the first everything is ok, in the second there is a problem.

1st scenario :

- I create a new event record
- I choose a person record for the event
- I change the value of the checkbox, i got the alert "this change will affect which fields ..." and new fields are displayed and other are hidden
- I enter values for the other fields
- Save and close

In this scenario, when i see the frontend in draft mode, i can see the event i just created in single view of the person (there is a section : List of events for the displayed person)

Second scenario :

- I create a new event record
- I change the value of the checkbox, i got the alert "this change will affect which fields ..." and new fields are displayed and other are hidden
- I choose a person record for the event
- I enter values for the other fields
- Save and close

(notice, this time i clicked the checkbox before choosing the person)

Now with this scenario, in the frontend in draft mode, i can't see the record i just created! I tried to update the record again and again, nothing to do the record is never displayed in draft mode.

In the events table, i see two records for the event i just created, the first has the good pid, but nothing in the person field. The second containing the the values i entered after the change of the form when clicked on the checkbox, and the pid for this record is -1. And everytime i make changes in the form, only the second record (with pid -1) is updated.

Can you please fix this issue ?

Thanks.

Actions

Also available in: Atom PDF