backend icon indicating copy to clipboard operation
backend copied to clipboard

Local attributes' values not being removed on product template

Open kardi31 opened this issue 4 years ago • 2 comments

Bug type

Architecture

Reproduce steps:

  1. I add new SELECT attribute with scope local.
  2. I assign new attribute to a template.
  3. I select attribute value on product X template & save the product.
  4. I clear attribute value on product X & save the product
  5. I remove attribute from a template
  6. I attempt to remove attribute

Expected outcome :

attribute is removed

Actual outcome :

Error message is displayed that the attribute is connected to product X

Debugging results :

When I unset attribute value on product template, the value is saved as null. For example, for attribute with scope local, the value looks like en_GB = null, pl_PL = null. When attempting to remove attribute, the relationship between product & attribute still exists even though all the values are null. Product attribute updater do not check in any place whether attribute has not empty values.

Environment


Ergonode version: 1.1.4

 

kardi31 avatar Nov 18 '21 13:11 kardi31

Ad step 4)

In the case of local attributes, entering an 'empty' value for a language does not delete it, but overwrites the with empty value with its ancestor in the language tree.

If it is necessary to delete a value for a language, it should not be overwritten. This can be done from the tab edit product values using the dedicated functionality

obraz

In that case we should not consider it as a bug

rprzedzik avatar Nov 22 '21 13:11 rprzedzik

@rprzedzik Ok, but what if a product has all values for certain attribute as empty? Should such value not be deleted completely? Also from user experience perspective, I'd expect "clear all" button to remove value for this attribute, not just empty it. clearall

kardi31 avatar Nov 24 '21 11:11 kardi31