Skip to content

Undefined index id in switch input of setting form #18

Description

@atmansviluppo

I updated prestashop to version 1.7.8.7 in my local environment and found the error bellow when opening the module setting page:

image

This happens because the values array of switch input does not have the key id:

array(
'type' => 'switch',
'label' => $this->l('Store orders'),
'name' => 'CODWFEEPLUS_KEEPTRANSACTIONS',
'is_bool' => true,
'values' => array(
array(
'value' => 1,
),
array(
'value' => 0,
),
),

It should be:

'values' => array( 
         array( 
             'id' => 'active_on', 
             'value' => 1, 
         ), 
         array( 
             'id' => 'active_off', 
             'value' => 0, 
         ), 

All switch input in the form need to be fixed.

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions