Project

General

Profile

Bug #3875

FormElement 'extra': Fehler bei neuen records

Added by Elias Villiger over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
08.06.2017
Due date:
% Done:

0%

Estimated time:
Discuss:

Description

In qfq 0.18.1: Ein Formular mit einem FormElement vom Typ 'extra' (z.B. soll bei einem bestimmten Formular eine konstante grId gespeichert werden, diese aber dem User nicht sichtbar sein): Wird ein neuer Record mit diesem Formular gespeichert, tritt untenstehender Fehler auf. Der Fehler tritt nicht auf, wenn ein bestehendes Formular gespeichert wird.

Code: 1201
Message: Value of 'grId' already set in store 'S'.
Page Id: 95
Content Id: 95
Form: personRoomAssignment
Form Element: 712 / grId / 

Beispielformular auf geolean/dev_cr: Edit Person, Pill Address, New Room Assignment


Related issues

Related to QFQ - Support #3853: New > Save: Reload des Forms mit neuer SIP und neu ersteller recordIdClosed2017-06-04

Related to QFQ - Bug #5021: FE.typ=extra - during save displays error 'datum2' already filled in STORE_SIP - the value is stored neverthelessSome day maybe2017-11-29

Associated revisions

Revision 1117d36b (diff)
Added by Carsten Rose over 3 years ago

#3875 / FormElement 'extra': Fehler bei neuen Records.
QFQ complains that the given SIP parameter is already defined. Problem is the pre filling of Store SIP, which normally happens only during form load. But the new 'saving a new record (r=0) and redirecting the browser to the same page with the new record id', requires a new SIP. That SIP is calculated before form-load and causes the exception. Fix: defined parameter in a store, which will be redefined with the same value, wont' throw an exception anymore.
Store.php: compare old and new value and only if they differ throw an exception.

History

#1 Updated by Elias Villiger over 3 years ago

  • Project changed from geo-lean to QFQ

#2 Updated by Carsten Rose over 3 years ago

  • Related to Support #3853: New > Save: Reload des Forms mit neuer SIP und neu ersteller recordId added

#3 Updated by Carsten Rose over 3 years ago

  • Status changed from New to Closed

Fixed: redifinition with same value is now allowed.
Another possible approach would be to check in buildExtra() if the var is already defined with the same value. The choosen approach seems to be more general.

#4 Updated by Carsten Rose almost 3 years ago

  • Related to Bug #5021: FE.typ=extra - during save displays error 'datum2' already filled in STORE_SIP - the value is stored nevertheless added

Also available in: Atom PDF