Bug #19131
closedWarning 102 when saving record with hidden double fields in the BE
0%
Description
Steps to reproduce:
1. Install the "seminars" extension.
2. Create a non-admin BE user who is allowed to create organizer and event records.
3. Log in as/sudo to that BE user.
4. Create an organizer record and save/close it.
5. Create a seminar record, enter a title and assign the organizer.
6. Save it.
This error message is displayed (although the rest of the data is saved okay):
102: These fields are not properly updated in database:
(price_regular_early,price_regular_board,price_special,price_special_early,price_special_board)
Probably value mismatch with fieldtype.
These fields are hidden and defined like this in SQL and TCA:
price_regular decimal(7,2) DEFAULT '0.00' NOT NULL,
'price_regular' => array(
'exclude' => 1,
'label' => 'LLL:EXT:seminars/locallang_db.xml:tx_seminars_seminars.price_regular',
'config' => array(
'type' => 'input',
'size' => '8',
'max' => '8',
'eval' => 'double2',
'checkbox' => '0.00',
'range' => array(
'upper' => '99999.99',
'lower' => '0'
),
'default' => 0
)
),
I guess that the problem is that hidden excludefields are saved to an empty string by default (this is a guess), which isn't a valid value for DECIMAL.
This might be related to bug 6194.
(issue imported from #M9016)
Updated by Niels Pardon over 15 years ago
The TCA of seminars is wrong.
'default' => 0 has to be 'default' => '0.00'
This bug can be closed as invalid.
Updated by Krystian Szymukowicz about 15 years ago
I have 'default' => '0.00' and still the same problem exist: "These fields are not properly updated in database:"
'tx_promo_year_1_m_01' => array (
'exclude' => 1,
'label' => 'LLL:EXT:promo/locallang_db.xml:fe_users.tx_promo_year_1_m_01',
'config' => array (
'type' => 'input',
'size' => '10',
'max' => '10',
'eval' => 'double2',
'default' => '0.00'
)
),
Updated by Krystian Szymukowicz about 15 years ago
Sorry - I was wrong.
I had in table
tx_promo_year_1_m_01 double DEFAULT '0' NOT NULL,
after changing to
tx_promo_year_1_m_01 decimal(7,2) DEFAULT '0.00' NOT NULL,
there is no warning now.
Updated by Christian Kuhn over 14 years ago
Resolved, no change required:
Extension issue, but not a core problem.