Wrong media URL in WYSIWYG editor when adding images in various Magento store viewsWrong URL returned by WYSIWYG editor for imagesMagento 1.8.1.0 WYSIWYG editor is not displaying thumbnails in image managerURL returned by WYSIWYG is wrongSkin directive doesn't work in WYSIWYG editor when using custom templateMagento Insert Image on WYSIWYG editor does not show imagesImages are not showing in WYISWYG editorMagento 2 WYSIWYG Media image directive using admin url*Not browse images* WYSIWYG editor not showing images properlyBroken images on the front-end when uploaded through WYSIWYG or WidgetsIssue with “Insert Image” or “Insert Link” in WYSIWYG editor on catalog product pagesAdding 'insert images' button to WYSIWYG editor for category default attribute 'description' / remove setting from ui xml file
Does Latin have any neuter words for humans?
Is there reliable evidence that depleted uranium from the 1999 NATO bombing is causing cancer in Serbia?
Movie with Zoltar in a trailer park named Paradise and a boy playing a video game then being recruited by aliens to fight in space
What's the safest way to inform a new user of their password on an invite-only website?
Thin wall to block LED light from hitting photodiode?
Is it okay to fade a human face just to create some space to place important content over it?
Converting Geographic Coordinates into Lambert2008 coordinates
Can European countries bypass the EU and make their own individual trade deal with the U.S.?
Sharing referee/AE report online to point out a grievous error in refereeing
How is this practical and very old scene shot?
Can you actually break an FPGA by programming it wrong?
Why would anyone even use a Portkey?
Most elegant way to write a one-shot 'if'
Comment traduire « That screams X »
How did researchers find articles before the Internet and the computer era?
What game is this character in the Pixels movie from?
Bin Packing with Relational Penalization
Just graduated with a master’s degree, but I internalised nothing
How could a satellite follow earth around the sun while staying outside of earth's orbit?
Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus
Word ending in "-ine" for rat-like
Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?
My colleague is constantly blaming me for his errors
Why was Mal so quick to drop Bester in favour of Kaylee?
Wrong media URL in WYSIWYG editor when adding images in various Magento store views
Wrong URL returned by WYSIWYG editor for imagesMagento 1.8.1.0 WYSIWYG editor is not displaying thumbnails in image managerURL returned by WYSIWYG is wrongSkin directive doesn't work in WYSIWYG editor when using custom templateMagento Insert Image on WYSIWYG editor does not show imagesImages are not showing in WYISWYG editorMagento 2 WYSIWYG Media image directive using admin url*Not browse images* WYSIWYG editor not showing images properlyBroken images on the front-end when uploaded through WYSIWYG or WidgetsIssue with “Insert Image” or “Insert Link” in WYSIWYG editor on catalog product pagesAdding 'insert images' button to WYSIWYG editor for category default attribute 'description' / remove setting from ui xml file
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I will try to explain a strange behavior (maybe bug) when using WYSIWYG editor in Magento 1.9.
Magento setup
One website with three store views. Each store view is on different domains. For this case let’s focus only on two storeviews:
storeview 1: mywebshop.eu
storeview 2: mywebshop.it
Steps for reproducing the error.
SCENARIO 1 which is OK.
Open desired product, and open WYSIWYG for description field. Select storeview 1 (english)
Add an image (using the editor’s button Insert/Edit image).
The Html code I get is ok like this:
img src="media url="wysiwyg/adobe-pdf-icon-02.png"" /
The image is corectly displayed in frontend like this:
SCENARIO 2 which is not OK.
RE-Open the same desired product and open WYSIWYG for description field. (Now select store view 2 (Italian)
Add an image (using the editor’s button Insert/Edit image).
Now the code I get is like this:
img src="media url="https://mywebshop.it/media/wysiwyg/adobe-pdf-icon-02.png"" /
The image in frontend is broken, because the HTML output is like this:
RESULT: the image is not displayed because of malformed img src.
We have recently setup Magento that each store view has a different domain. (Maybe this affects).
I saw very similar question here --> Wrong URL returned by WYSIWYG editor for images
But this answer doesn't help/work (Wrong URL returned by WYSIWYG editor for images)
Please help.
magento-1.9 image wysiwyg media
add a comment |
I will try to explain a strange behavior (maybe bug) when using WYSIWYG editor in Magento 1.9.
Magento setup
One website with three store views. Each store view is on different domains. For this case let’s focus only on two storeviews:
storeview 1: mywebshop.eu
storeview 2: mywebshop.it
Steps for reproducing the error.
SCENARIO 1 which is OK.
Open desired product, and open WYSIWYG for description field. Select storeview 1 (english)
Add an image (using the editor’s button Insert/Edit image).
The Html code I get is ok like this:
img src="media url="wysiwyg/adobe-pdf-icon-02.png"" /
The image is corectly displayed in frontend like this:
SCENARIO 2 which is not OK.
RE-Open the same desired product and open WYSIWYG for description field. (Now select store view 2 (Italian)
Add an image (using the editor’s button Insert/Edit image).
Now the code I get is like this:
img src="media url="https://mywebshop.it/media/wysiwyg/adobe-pdf-icon-02.png"" /
The image in frontend is broken, because the HTML output is like this:
RESULT: the image is not displayed because of malformed img src.
We have recently setup Magento that each store view has a different domain. (Maybe this affects).
I saw very similar question here --> Wrong URL returned by WYSIWYG editor for images
But this answer doesn't help/work (Wrong URL returned by WYSIWYG editor for images)
Please help.
magento-1.9 image wysiwyg media
add a comment |
I will try to explain a strange behavior (maybe bug) when using WYSIWYG editor in Magento 1.9.
Magento setup
One website with three store views. Each store view is on different domains. For this case let’s focus only on two storeviews:
storeview 1: mywebshop.eu
storeview 2: mywebshop.it
Steps for reproducing the error.
SCENARIO 1 which is OK.
Open desired product, and open WYSIWYG for description field. Select storeview 1 (english)
Add an image (using the editor’s button Insert/Edit image).
The Html code I get is ok like this:
img src="media url="wysiwyg/adobe-pdf-icon-02.png"" /
The image is corectly displayed in frontend like this:
SCENARIO 2 which is not OK.
RE-Open the same desired product and open WYSIWYG for description field. (Now select store view 2 (Italian)
Add an image (using the editor’s button Insert/Edit image).
Now the code I get is like this:
img src="media url="https://mywebshop.it/media/wysiwyg/adobe-pdf-icon-02.png"" /
The image in frontend is broken, because the HTML output is like this:
RESULT: the image is not displayed because of malformed img src.
We have recently setup Magento that each store view has a different domain. (Maybe this affects).
I saw very similar question here --> Wrong URL returned by WYSIWYG editor for images
But this answer doesn't help/work (Wrong URL returned by WYSIWYG editor for images)
Please help.
magento-1.9 image wysiwyg media
I will try to explain a strange behavior (maybe bug) when using WYSIWYG editor in Magento 1.9.
Magento setup
One website with three store views. Each store view is on different domains. For this case let’s focus only on two storeviews:
storeview 1: mywebshop.eu
storeview 2: mywebshop.it
Steps for reproducing the error.
SCENARIO 1 which is OK.
Open desired product, and open WYSIWYG for description field. Select storeview 1 (english)
Add an image (using the editor’s button Insert/Edit image).
The Html code I get is ok like this:
img src="media url="wysiwyg/adobe-pdf-icon-02.png"" /
The image is corectly displayed in frontend like this:
SCENARIO 2 which is not OK.
RE-Open the same desired product and open WYSIWYG for description field. (Now select store view 2 (Italian)
Add an image (using the editor’s button Insert/Edit image).
Now the code I get is like this:
img src="media url="https://mywebshop.it/media/wysiwyg/adobe-pdf-icon-02.png"" /
The image in frontend is broken, because the HTML output is like this:
RESULT: the image is not displayed because of malformed img src.
We have recently setup Magento that each store view has a different domain. (Maybe this affects).
I saw very similar question here --> Wrong URL returned by WYSIWYG editor for images
But this answer doesn't help/work (Wrong URL returned by WYSIWYG editor for images)
Please help.
magento-1.9 image wysiwyg media
magento-1.9 image wysiwyg media
edited Jun 21 at 6:36
Shorabh
9675 silver badges15 bronze badges
9675 silver badges15 bronze badges
asked Jun 20 at 11:21
TheAgentTheAgent
84 bronze badges
84 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Option - 1
Open or extend (Overwrite) app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
file and update getImageHtmlDeclaration
function.
Replace below code
$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);
To
$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);
Option - 2
Go to System > Configuration > Content Management (Under General) > WYSIWYG Options
Use Static URLs for Media Content in WYSIWYG for Catalog – Select “No”
I hope it will help you
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279021%2fwrong-media-url-in-wysiwyg-editor-when-adding-images-in-various-magento-store-vi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Option - 1
Open or extend (Overwrite) app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
file and update getImageHtmlDeclaration
function.
Replace below code
$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);
To
$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);
Option - 2
Go to System > Configuration > Content Management (Under General) > WYSIWYG Options
Use Static URLs for Media Content in WYSIWYG for Catalog – Select “No”
I hope it will help you
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
add a comment |
Option - 1
Open or extend (Overwrite) app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
file and update getImageHtmlDeclaration
function.
Replace below code
$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);
To
$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);
Option - 2
Go to System > Configuration > Content Management (Under General) > WYSIWYG Options
Use Static URLs for Media Content in WYSIWYG for Catalog – Select “No”
I hope it will help you
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
add a comment |
Option - 1
Open or extend (Overwrite) app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
file and update getImageHtmlDeclaration
function.
Replace below code
$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);
To
$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);
Option - 2
Go to System > Configuration > Content Management (Under General) > WYSIWYG Options
Use Static URLs for Media Content in WYSIWYG for Catalog – Select “No”
I hope it will help you
Option - 1
Open or extend (Overwrite) app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php
file and update getImageHtmlDeclaration
function.
Replace below code
$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);
To
$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);
Option - 2
Go to System > Configuration > Content Management (Under General) > WYSIWYG Options
Use Static URLs for Media Content in WYSIWYG for Catalog – Select “No”
I hope it will help you
edited Jun 21 at 4:47
answered Jun 20 at 11:57
ShorabhShorabh
9675 silver badges15 bronze badges
9675 silver badges15 bronze badges
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
add a comment |
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
I already tried option1, but it doesn't work ... maybe I missing something. Option 2 is not ok beacuse we want to to create a new website in the future and I believe this will create some problems ...
– TheAgent
Jun 20 at 12:30
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
UPDATE: Option 1 actualy resolves the issue. I just had the the class Mage_Cms_Helper_Wysiwyg_Images extended in another module... Thank you!!
– TheAgent
Jun 20 at 14:16
Please accept answer
– Shorabh
Jun 21 at 4:51
Please accept answer
– Shorabh
Jun 21 at 4:51
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f279021%2fwrong-media-url-in-wysiwyg-editor-when-adding-images-in-various-magento-store-vi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown