Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

DB-Connected (MySQL) modify filters UI-problem #377

Open
@JTS-FIN-Nettitaivas

Description

@JTS-FIN-Nettitaivas

Fresh Apigility 1.4.1 installation.

  1. Create a new Database Connected service from a MySQL table (PDO)
  2. Try to modify automatically generated filters from admin UI
  3. Fails, nothing happens other than new errors in browser console "Error: k.filter.options is undefined" (Firefox)

I tracked this down to module/API_NAME/config/module.config.php, where in input_filter_specs validator fields are generated like this:

0 => [
                'name' => 'column_name',
                'required' => false,
                'filters' => [
                    0 => [
                        'name' => \Zend\Filter\StringTrim::class,
                    ],
                    1 => [
                        'name' => \Zend\Filter\StripTags::class,
                    ],
                ],

So, no options... I got this fixed by manually edition all the validator fields to this format:

0 => [
                'name' => 'column_name',
                'required' => false,
                'filters' => [
                    0 => [
                        'name' => \Zend\Filter\StringTrim::class,
                        'options' => [],
                    ],
                    1 => [
                        'name' => \Zend\Filter\StripTags::class,
                        'options' => [],
                    ],
                ],

Now UI for modifying filters works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions