Project

General

Profile

Actions

Bug #87031

closed

colorpicker : pasted value is saved in database without formating/checking

Added by Filipe DA COSTA COSTA over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2018-11-28
Due date:
% Done:

100%

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

Description

If you paste a value into a colorpicker, some formating seems to be done but in reallity the raw value is saved in database.

A) Color missing hash (See attached Typo3ColorpickerIssueColor.gif)

  • Copy "00FF00"
  • Paste the value into colorpicker
  • Blur out of the input

The input value will visually change to "#00ff00".

  • Save page

The colorpicker displays "00FF00".

B) Random value (See attached Typo3ColorpickerIssue.gif)

  • Copy "NOT_A_COLOR"
  • Paste the value into colorpicker
  • Blur out of the input

The input value will visually be blank. If you have a "eval => required" you will notice that the red error will disappear.

  • Save page

The colorpicker displays "NOT_A_COLOR".

TCA configuration used for this example:

 'tx_apxsample_color' => [
        'exclude' => 1,
        'label'   => 'Color Hex Code',
        'config'  => [
            'type'       => 'input',
            'renderType' => 'colorpicker',
            'size'       => 10,
            'eval'       => 'required'
        ]
    ]

Files

Typo3ColorpickerIssue.gif (450 KB) Typo3ColorpickerIssue.gif Filipe DA COSTA COSTA, 2018-11-28 18:13
Typo3ColorpickerIssueColor.gif (509 KB) Typo3ColorpickerIssueColor.gif Filipe DA COSTA COSTA, 2018-11-28 18:13

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #88593: ColorPicker throws JS error if not used in FormEngine contextClosedAndreas Kienast2019-06-19

Actions
Actions

Also available in: Atom PDF