Skip to content

Wysiwyg editor image upload not working in magento 2 #9292

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

Closed
manishALW opened this issue Apr 18, 2017 · 21 comments
Closed

Wysiwyg editor image upload not working in magento 2 #9292

manishALW opened this issue Apr 18, 2017 · 21 comments
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line 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

Comments

@manishALW
Copy link

Preconditions
Using Ubuntu, php7, apache
Have latest stable release of Magento 2.1.5 installed.

Steps to reproduce
Log into admin
Navigate to PRODUCTS >>g
In the editor form open up: Content >> Description
Enable WYSIWYG editor
Use the Insert/Edit image icon in the editor toolbar
Use the "Browse" icon/button (it's next to "Image url" field) in the popup that opens
Choose any image
(the image will show up in the product description area)
save the product
switch to storefront in another tab
search for the same product for which image will upload.
choose the product in result that has that exact name
find the product description on the page (the added image should be visible there)
[admin tab] sign out from admin
[storefront tab] reload the category page

Expected result
Image gets rendered in the description area
Actual result

Image is not rendered, instead you get broken image link icon
Notes

@hostep
Copy link
Contributor

hostep commented Apr 18, 2017

This sounds like a duplicate of #6138
It was already fixed on the develop branch, but the fix hasn't been published yet in an official release.

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-70435

@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Jul 31, 2017
@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 21, 2017
@magento-engcom-team
Copy link
Contributor

@manishALW Closing this issue as it is already fixed in multiple versions.
Please reopen if you have any further questions.

Thank you.

@versdivers
Copy link

versdivers commented Nov 27, 2017

This has not been fixed in Magento 2.2.1.
How would this ever work??

<img src="{{media url="wysiwyg/compo_payments.png"}}" alt="" />

(the code that it outputs)

You can not open with " and then define your path with ".
This editor gives me nightmares

@UlliKah
Copy link

UlliKah commented Jul 27, 2018

Status update on this::27-July-2018
We are currently working on a Magento 2.2.x project. As it turns out this issue IS STILL NOT FIXED! Because we are facing the same as everyone else... Editor doesn't do its job 'image-insert' properly.
Basic cms standart function - Image Upload and Insert into Article or Product. Works flawlessly in ANY CMS / eCommerce MS from WP WooCommerce to ... well everywhere BUT not in Magento 2.
This is a joke considering that Magento claims to be the most advanced e-Commerce solution but seems to be unable to fix this essential basic functionality.
FYI - I personally know about this since September 2016 <-- 2 YEARS. Solved by BUYING external plugin!!! Maybe therein lies the true reason for this basic issue that was first solved 22 years ago - an eternity in Web Dev terms. Selling expensive plugins to fix something that shouldn't need fixing in the first place.

@CompactCodeEU
Copy link

@UlliKah I get your frustration and sure you have a point but in the end this is an opensource project and you can pay for the supported EE version if you want. Magento has a lot of good things that woocommerce does not have. Woocommerce is a paid plugin on the opensource wordpress. So i do not see a difference.

@UlliKah
Copy link

UlliKah commented Jul 30, 2018

@CompactCodeEU . If you are aware of the dev process of Magento than you'll know that they like to ""guinea-pig" test each development with the Open Source Version first and implement into the very expensive Enterprise once stable... which means... the Image insert is very likely not working in Magento Enterprise, well I know it isn't in Enterprise either... Magento Enterprise has a price Tag with 5 digits (upwards from 20000,-- ). Inserting Imaes for products and Articles is BASIC FUNCTION of EVERY CMS or ECS... It should just work without the need to fix the source code or pay extra money to get this working... especially if a client has just payed a massive amount of money for the Enterprise Version.... May I assume that you are one of those offering a solution (for an extra fee of course...)?

@CompactCodeEU
Copy link

@UlliKah Fixes and solutions on Magento we usually make an opensource project (like the breadcrumbs) that everyone can freely download or use. We only sell modules that have a certain added value to the opensource Magento platform. We also contribute or push changes to the opensource like everyone else does to make the base Magento as bug free as possible.

@UlliKah
Copy link

UlliKah commented Jul 31, 2018

In any case I think these issues with basic functionality shouldn't persist for nearly 2 years, especially with a system like Magento that claims to be the leading solution in its specialisation.
I have to say though that I'm glad that the osCommerce core team has decided to pick-up development of osCommerce again. It might not look as fancy on the back end but it does the job a lot better.

@NickvdMeij
Copy link

Using Magento 2.1.x (latest minor patch, always) and it is still not fixed. Been waiting for almost 6 months for a fix (since I got the first bug report from end-users about this). How on earth is this issue closed and labeled "Fixed" for all versions, when it is clearly not AND users are actively complaining about it?!

PS @CompactCodeEU EE support won't make any difference. If they even can fix it in EE, it should also (probably automatically) be fixed in CE since most packages are used in both (Like the WYSIWYG editor). Furthermore, if you can't get a simply WYSIWYG working, you are really doing something wrong as a webdeveloper IMO...

@hostep
Copy link
Contributor

hostep commented Jul 31, 2018

@ all complainers above: I completely understand your frustration, because it was fixed and then broken again and then fixed again. But as far as I'm aware, it is definitely fixed on the latest versions (2.1.14 & 2.2.5). Just to be sure, I've just tested those versions and can't reproduce the issue.

If someone is certain that he/she can trigger the problem using a non-customised store running the latest version, can you please specify the exact steps to reproduce. That would be very appreciated!

Let me also link this to #6138 and #7215.

@NickvdMeij
Copy link

@hostep , I just tested this out with 2.1.14 but it is still broken. It generated the following URL when i uploaded an image:
https://xxxxxxxx.com/admin_xxxxxx/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvSmF2YS1wcm9ncmFtbWVyZW4ucG5nIn19/key/8a8f8ecd7ed26270015b1440c7373391574fd287db0c2c6e2844069c80540791/

As you can see, the image still contains the admin slug and furthermore, the images gives a 404 not found when you are logged in as administrator and it gives a 403 forbidden when you are not logged in.

Where did you upload the image? Only in a product descriptions or also in blocks, pages and all the other places where the wysiwyg can be used? Furthermore, what are the version numbers of all packages you have installed, so I can cross reference it with the packages I have locally to see if there are any differences.

@UlliKah
Copy link

UlliKah commented Aug 1, 2018

@NickvdMeij Yes that is the insert directive which doesn't get converted into the actual image URL. Instead the system just inserts the convert directive / command and that doesn't work... The issue is ancient and hasn't been fixed neither in CE or EE version...

@hostep
Copy link
Contributor

hostep commented Aug 1, 2018

@NickvdMeij: it was in the product description. It was done on Magento 2.1.14 installed from scratch using composer.

If you would be so kind: can you list all the exact steps taken to trigger the problem?
It would also be nice if you can try to reproduce it on a clean Magento 2.1.14 as well, I still have the feeling it might be triggered by some sort of customisation done to your installation.

I'll then try it again when you've provided exact steps to reproduce.

@NickvdMeij
Copy link

@UlliKah then how do you add an image? Furthermore, if its ancient and broken then why isn't it at least hidden from end-users?

@hostep I did basically the same as you, install through composer and just make a page and add a block and use the WYSIWYG editor to add an image. There aren't more steps then that honestly

@hostep
Copy link
Contributor

hostep commented Aug 1, 2018

@NickvdMeij : just tried a couple more times, still can't reproduce :(

But maybe something else you can try - if you haven't tried it before - is by clicking the 'Show / Hide Editor' button, then position your cursor on the place in the code where the image needs to go and then click the 'Insert Image...' button.
I've noticed in the past that inserting an image this way seems to give fewer issues. But it might not be as "user friendly" as using the full wysiwyg editor.

@UlliKah
Copy link

UlliKah commented Aug 3, 2018

@NickvdMeij The issue with inserting images into content in Magento 2 is ancient not the editor. Its not hidden because its a function a user needs nearly everywhere in the system. That's why it's so lucrative to keep it broken because if you are not a developer you have to pay either an alternative plugin or a Magento expert to get it working. The only real solution here is to refuse paying extra for something that should be working with initial installation. You'll see, as soon as people can't cut any extra money out of it this issue will be solved for good a lot quicker than you can say "A".

@NickvdMeij
Copy link

@UlliKah so to summarize your view, Magento 2 uses ancient technology, which is broken and won't be fixed because some people can make a quick buck off it by making a workaround plugin instead of just fixing it broken functionality? Good to know for the next time I need to set up an E-commerce website

@danielhyt2
Copy link

@UlliKah I'm also very disappointed with Magento 2. I was once a Magento 1 developer. However, I've moved to a different field of expertise due to Magento 2. I do like Magento 1 but not Magento 2. Unlike Magento 1, learning Magento 2 only wasted my time and proved not to be worth it. So much for the new version. Oh boy...

@CompactCodeEU
Copy link

CompactCodeEU commented Nov 14, 2018

Magento team is working hard on improving on each aspect. They provide such a massive open source framework. It is impossible to rewrite everything at once. Magento 2 is way better then Magento 1 in many regards. Often the bugs and features that are lacking are still comming from old Magento 1 code. We develop in Magento 2 as an agency full time and sure there are a lot of improvements to be done but every update there is a huge improvement. Did you even read the implementation of PWA and GraphQL into 2.3? Everyone his/her thought on the matter but this is mine.

@CompactCodeEU
Copy link

CompactCodeEU commented Nov 14, 2018

In regards of this wysiwyg you are aware that in the upcoming 2.3 they are implementing the new tinymce which is far less buggy and had more features. https://devdocs.magento.com/guides/v2.3/release-notes/ReleaseNotes2.3.0OpenSource.html
image

I would do some research before stating a comment like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line 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
Projects
None yet
Development

No branches or pull requests

8 participants