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

Undefined index id in switch input of setting form #18

Open
atmansviluppo opened this issue Sep 1, 2022 · 1 comment
Open

Undefined index id in switch input of setting form #18

atmansviluppo opened this issue Sep 1, 2022 · 1 comment

Comments

@atmansviluppo
Copy link

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!

@Luifer-dnk
Copy link

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!

FIxed, many thanks !!!

But have a new bug on file /modules/codwfeeplus/views/templates/admin/_configure/helpers/form/form.tpl.

Now put a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants