-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Cannot create a etc/view.xml
file with an images
tag with an attribute module
other than Magento_Catalog
#5381
Comments
Same problem here. I will try to find time for propose a pull request in (near?) future. Just change this part:
by:
And that seems solve the problems. |
Confirmed. Can someone get the ball rolling on this one, please? Mark it |
Any news about when this bug can be fixed? |
I see that the PR for this was accepted. Can I close the issue? |
Internal ticket to track issue progress: MAGETWO-70256 |
@tzyganu @ajpevers thank you for your report. |
[TSG] Fixes for 2.4 (pr13) (2.4-develop)
Description
I've been trying to create an extension with an entity that has an image attribute. I want to show on frontend the resized image similar to how the product image is resized in the product list page.
For this I've created image model and helper and the builder block.
The resize works perfectly if I specify the width and height (and other attributes) in the template file when calling
$block->getImage(....)
.But I wanted to do it properly and read the resize values from the
view.xml
fileThen I created a file called
etc/view.xml
and every page crashesSteps to reproduce
Create a file called
etc/view.xml
in any module with this contentExpected result
I should be able to read my values using
Magento\Framework\View\ConfigInterface::getViewConfig()::getMediaAttributes('Namespace_Module', 'image', 'whatever_here')
Actual result
Every page crashes because the merged
view.xml
files apparently are not valid.The error message is
Line 22 in my file is
<images module="Namespace_Module">
Additional info:
Changing
Namespace_Module
toMagento_Catalog
makes the error go away, but then again I cannot have a configuration for my module.The text was updated successfully, but these errors were encountered: