-
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
Dynamic Media URLs in Products not working properly #7215
Comments
Duplicate of #6138 which is already acknowledged internally |
@dthampy Just FYI... In version 2.1.2, media directives work (backend + frontend) for CMS pages , but not for product description and short description. Which i really don't understand... the same component should work properly everywhere and not just in one instance. I'm using this format by the way: {{media url=wysiwyg/icons/some_icon.png}} Would be great if something crucial like this would be finally fixed in version 2.2.0 ;) |
Current 2.1.3 i got same problem like this. Catalog Edit not work. Cms Page work |
Currently 2.1.4 and I'm still experiencing the same issue. |
Internal ticket to track issue progress: MAGETWO-70435 |
Same issue with my instalaltion: Magento 2.2.0 |
Same issue with our current installation : Magento 2.2.1 |
I thought this was not resolved in 2.2, also. But Magento support said they could not reproduce it. So I created a new WYSIWYG text area attribute in attempt to reproduce this from "Step 1", and it did work. So then I edited and re-saved my existing text area attributes - without changing any settings - and then my old attributes started processing the media url directives as well. I'm not sure if the 2.2 upgrade forgot to update some table or something - but simply editing and re-saving the Attribute configuration in the Admin area resolved this, and the {{media}} directives are working on custom Product attributes now. |
Same issue with our current installation : Magento 2.2.2 Community Edition When inserting a media file from categories Content -> Description The following src tag: <img src="{{media url="wysiwyg/case-studies-img3.jpg"}}" alt="" /> doesn't parse the string and display as it is in the page <img src="{{media url=" wysiwyg="" case-studies-img3.jpg"}}"="" alt=""> |
Any workarounds ? |
Can someone who still runs into these problems try to reproduce this on a clean Magento installation (preferably using the latest versions, so version 2.1.12 and 2.2.3 at the time of writing), since I'm pretty sure this first got fixed in 2.1.8, broken again in 2.1.9 and then fixed again in 2.1.11 and also fixed in 2.2.1 or 2.2.2, but if you can reproduce this on a clean installation feel free let us know, or maybe better, create a new issue. Thanks! :) |
On Magento 2.2.2 EE the issue still exists, dynamic urls do not work with:
|
[Platform Health] Updates for PHP8.1
Preconditions
Steps to reproduce
Allow Dynamic Media URLs in Products and Categories
is set toYes
(inCatalog
)Use Static URLs for Media Content in WYSIWYG for Catalog
is set toNo
(inContent Management
)Description
fieldInsert Image...
button<img src="{{media url="wysiwyg/abc.jpg"}}" alt="" />
Description
field again and hide the editor againExpected result
<img src="{{media url="wysiwyg/abc.jpg"}}" alt="" />
Actual result
<img src="{{media url=" alt="" />
Discussion
This only seems to happen in products (maybe also categories). In CMS pages, this works as expected.
A second problem is if you do the same, but with the Editor enabled, and insert an image, it adds this html:
<img src="https://example.com/admin-url-identifier/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvRFNDRjcxNjYuanBdqsfdqds/key/1b2f66950dc8519c79a63dc568af88e0731f5ca997f819cede1d1624d4fqsdfqsdf/" />
This is even worse, it leaks the admin-url-identifier to the outside world, which is probably a security issue?
And if you work with deploys with a current/releases/shared directory structure (capistrano for example), this image only works until you do a next deploy. After a deploy this url is broken and the image doesn't show up again in the frontend or adminhtml.
I would have expected that with the editor enabled, we also would get this
{{media}}
type of url instead of the weird url we now get.The text was updated successfully, but these errors were encountered: