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

Category admin reset button does nothing #1237

Closed
tzyganu opened this issue May 6, 2015 · 3 comments
Closed

Category admin reset button does nothing #1237

tzyganu opened this issue May 6, 2015 · 3 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@tzyganu
Copy link
Contributor

tzyganu commented May 6, 2015

Version
0.74.0-beta7

Steps to reproduce

  • go to Products->Categories in the backend.
  • click on a category for editing
  • change the name of the category
  • hit the reset button from top right

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.valueASname, IF(s_name.value_id > 0, s_name.value, d_name.value) AS name, d_is_active.valueASis_active, IF(s_is_active.value_id > 0, s_is_active.value, d_is_active.value) AS is_active, d_is_anchor.valueASis_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_entityASseeLEFT JOINcatalog_category_productASscpON see.entity_id=scp.category_id WHERE (see.entity_id = e.entity_id) OR (see.path LIKE CONCAT(e.path, '/%'))) ASproduct_count, (SELECT COUNT(cp.product_id) FROM catalog_category_productAScpWHERE (cp.category_id = e.entity_id)) ASself_product_countFROMcatalog_category_entityASeLEFT JOINcatalog_category_entity_varcharASd_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 JOINcatalog_category_entity_varcharASs_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 JOINcatalog_category_entity_intASd_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 JOINcatalog_category_entity_intASs_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 JOINcatalog_category_entity_intASd_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 JOINcatalog_category_entity_intASs_is_anchor ON 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.

@kokoc kokoc added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label May 6, 2015
@kokoc
Copy link
Member

kokoc commented May 6, 2015

@tzyganu Thank you for reporting the issue. Internal reference: MAGETWO-37066

@kokoc
Copy link
Member

kokoc commented May 27, 2015

@tzyganu The fix is now available in 0.74.0-beta10. Thank you very much for your contribution and continued support to Magento 2! Could you please verify the issue?

@tzyganu
Copy link
Contributor Author

tzyganu commented May 27, 2015

@kokoc it works nicely on beta10. Thank you for the fix.

@tzyganu tzyganu closed this as completed May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

3 participants