Jump to content

Dropdown menus not working in the back office


Recommended Posts

Hey everyone, new Prestashop user here.  We've been trying to make changes in the back office and notice that recently all of the dropdown menus have become disconfigured.  It looks like a coding issue of some kind for the back office, none of these files were ever changed so we're not sure why this is happening.  We've tried refreshing, different browsers, going Incognito, nothing seems to work.  We've cleared the cache, that doesn't seem to work either.  Any thoughts would be greatly appreciated!!

Screen Shot 2021-02-03 at 8.26.40 AM.png

Screen Shot 2021-02-03 at 8.25.38 AM.png

Screen Shot 2021-02-03 at 8.24.47 AM.png

Link to comment
Share on other sites

Hi @patrickmccoy, I saw that dropdowns problem on a site with PS 1.7.6: it seems that the Twig version used in PS 1.7.6 does not support PHP 7.4.

Try to view the dropdowns code: in my scenario I saw that the there were not a space between the select HTML tag and its ID attribute. Something like 

<selectid="selectname" ....

As a temporary solution, if this is your case, you could update the file 

/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/form_div_layout.html.twig

changing this portion of code 

{%- block widget_attributes -%}
  id="{{ id }}" name="{{ full_name }}"
  {%- if read_only|default(false) and attr.readonly is not defined %} readonly="readonly"{% endif -%}
  {%- if disabled %} disabled="disabled"{% endif -%}
  {%- if required %} required="required"{% endif -%}

into this

{%- block widget_attributes -%}
  {{- " " -}}id="{{ id }}" name="{{ full_name }}"
  {%- if read_only|default(false) and attr.readonly is not defined %} readonly="readonly"{% endif -%}
  {%- if disabled %} disabled="disabled"{% endif -%}
  {%- if required %} required="required"{% endif -%}

 

Hope this helps you!

Nicola

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...