Category admin reset button does nothing #1237
Labels
bug report
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Progress: needs update
Version
0.74.0-beta7
Steps to reproduce
Products->Categories
in the backend.Expected result
The edit form is reset. The name field should contain the old value of the category name
Actual result
The edit form stays the same
Additional Info
In the response returned by the AJAX call made through the reset button there is an sql error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'd_name.entity_type_id' in 'on clause', query was: SELECT
e.*,
d_name.
valueAS
name, IF(s_name.value_id > 0, s_name.value, d_name.value) AS
name,
d_is_active.
valueAS
is_active, IF(s_is_active.value_id > 0, s_is_active.value, d_is_active.value) AS
is_active,
d_is_anchor.
valueAS
is_anchor, IF(s_is_anchor.value_id > 0, s_is_anchor.value, d_is_anchor.value) AS
is_anchor, (SELECT COUNT(DISTINCT scp.product_id) FROM
catalog_category_entityAS
seeLEFT JOIN
catalog_category_productAS
scpON see.entity_id=scp.category_id WHERE (see.entity_id = e.entity_id) OR (see.path LIKE CONCAT(e.path, '/%'))) AS
product_count, (SELECT COUNT(cp.product_id) FROM
catalog_category_productAS
cpWHERE (cp.category_id = e.entity_id)) AS
self_product_countFROM
catalog_category_entityAS
eLEFT JOIN
catalog_category_entity_varcharAS
d_nameON d_name.entity_id=e.entity_id AND d_name.attribute_id=41 AND d_name.entity_type_id=e.entity_type_id AND d_name.store_id=0 LEFT JOIN
catalog_category_entity_varcharAS
s_nameON s_name.entity_id=e.entity_id AND s_name.attribute_id=41 AND s_name.entity_type_id=e.entity_type_id AND s_name.store_id=0 LEFT JOIN
catalog_category_entity_intAS
d_is_activeON d_is_active.entity_id=e.entity_id AND d_is_active.attribute_id=42 AND d_is_active.entity_type_id=e.entity_type_id AND d_is_active.store_id=0 LEFT JOIN
catalog_category_entity_intAS
s_is_activeON s_is_active.entity_id=e.entity_id AND s_is_active.attribute_id=42 AND s_is_active.entity_type_id=e.entity_type_id AND s_is_active.store_id=0 LEFT JOIN
catalog_category_entity_intAS
d_is_anchorON d_is_anchor.entity_id=e.entity_id AND d_is_anchor.attribute_id=50 AND d_is_anchor.entity_type_id=e.entity_type_id AND d_is_anchor.store_id=0 LEFT JOIN
catalog_category_entity_intAS
s_is_anchorON s_is_anchor.entity_id=e.entity_id AND s_is_anchor.attribute_id=50 AND s_is_anchor.entity_type_id=e.entity_type_id AND s_is_anchor.store_id=0 WHERE (e.entity_id IN('2', '3')) ORDER BY LENGTH(e.path) ASC
If I change in the method
\Magento\Catalog\Model\Resource\Category\Tree::_createCollectionDataSelect
the line' AND %1$s.entity_type_id=e.entity_type_id AND %1$s.store_id=%3$d',
to' AND %1$s.store_id=%3$d',
(for both occurences of the line) everything works nicely but I'm afraid to do a pull request because I don't really understand the need for that constraint.The text was updated successfully, but these errors were encountered: