The function "isUsingStaticUrlsAllowed" (configuration setting "cms/wysiwyg/use_static_urls_in_catalog") doesn't have any effect with the WYSIWYG editor image insertion #12147
Labels
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
Preconditions
Steps to reproduce
Expected result
Actual result
The directive URL is returned.
Magento uses specially formatted URLs of the form:
To be able to render images in the wysiwyg editor. These URLs have two purposes:
However, in some situations stores may wish to disable this behaviour such that the URL is instead the standard URL for that scope:
https://${ADMIN_DOMAIN}/media/wysiwyg/bed2.png
This is controlled with the setting in the issue title. However, it currently has no effect. I think it likely broke here:
a978a4c
The controller on the frontend posts an empty store which s picked up by:
https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/OnInsert.php#L38
and stored as
""
. The problem is, the store configuration is either looking for a numeric store code, or the typenull
-- or it uses the configuration string exactly as supplied (i.e.""
):https://github.com/magento/magento2/blame/2.2-develop/lib/internal/Magento/Framework/App/Config.php#L68
This malforms the path, queries the configuration tree but returns
null
. It is thus impossible to use that setting from the frontend.It's possible that this is a bug in third party code, not supplying the string
default
in the post STORE. However, at this point I believe this to be a change in behaviour in upstream, and I will fix it accordingly.Plan for this is just to check if store is "" in the OnInsert controller, and if it is, use
null
and not "".The text was updated successfully, but these errors were encountered: