Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving new event record in TYPO3 9 fails #80

Closed
mspfr opened this issue Jun 19, 2019 · 2 comments
Closed

Saving new event record in TYPO3 9 fails #80

mspfr opened this issue Jun 19, 2019 · 2 comments
Assignees
Labels

Comments

@mspfr
Copy link
Collaborator

mspfr commented Jun 19, 2019

if group field no default value it does not save.

@dwenzel dwenzel changed the title typo3 9 save new record without default Saving new event record in TYPO3 9 fails Jun 21, 2019
@dwenzel
Copy link
Owner

dwenzel commented Jun 21, 2019

steps

  • no Organizer record exists (table tx_t3events_domain_model_organizer empty)
  • open list view in TYPO3 Backend
  • create new record (tx_t3events_domain_model_event)
  • fill in required field headline
  • save record

expected

  • record is saved to DB

observed

  • record is not saved
  • error message:

2: SQL error: 'Incorrect integer value: '' for column db.tx_t3events_domain_model_event.organizer at row 1' (tx_t3events_domain_model_event:NEW5d0c90fb238c3195710185)

dwenzel added a commit that referenced this issue Jun 21, 2019
- prevents error caused by invalid value
- fixes: #80
@dwenzel
Copy link
Owner

dwenzel commented Jun 21, 2019

@mspfr I could reproduce this issues for a installation with

  • Maria DB 10.2.22
  • sql_mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION (default)

Adding default = 0 in configuration for field tx_t3events_domain_model_event.organizer fixed it.

'organizer' => [
            'exclude' => 1,
            'label' => $ll . ':tx_t3events_domain_model_event.organizer',
            'config' => [
                'type' => 'group',
                'internal_type' => 'db',
                'allowed' => 'tx_t3events_domain_model_organizer',
                'l10nmode' => 'mergeIfNotBlank',
                'size' => 1,
                'default' => 0,
                'minitems' => 0,
                'maxitems' => 1,
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],

@dwenzel dwenzel added the bug label Jun 21, 2019
@dwenzel dwenzel assigned dwenzel and mspfr and unassigned dwenzel Jun 21, 2019
@dwenzel dwenzel closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants