magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

Widget instance layout updates doesn't store correctly for longer product types

Open Hanmac opened this issue 1 year ago • 0 comments

Preconditions (*)

  1. catalog_product_entity.type_id table column is 32 characters
  2. widget_instance_page.page_group table column is 25 characters

Steps to reproduce (*)

  1. Create a new Widget Instance with a Layout Update for a Specific Product Type, The Type has more than 16 characters
  2. Save the Page and Try to reload it.
  3. Because the page_group is created by $typeId . '_products', it can't save the entire name it should have into it.

Expected result (*)

  1. [Screenshots, logs or description]
  2. The Layout Update is correctly restored after save and load

Actual result (*)

  1. [Screenshots, logs or description]
  2. The Layout Update can't be correctly loaded, because the loaded Page Group Name is invalid

See this JS error:

Uncaught TypeError: pageGroup is null
    addPageGroup https://myWebshop/index.php/admin/widget_instance/edit/instance_id/3/type/cms-widget_block/package/default/theme/default/key//back/edit/:1307
    <anonymous> https://myWebshop/index.php/admin/widget_instance/edit/instance_id/3/type/cms-widget_block/package/default/theme/default/key//back/edit/:1533

Hanmac avatar Aug 22 '24 13:08 Hanmac