givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
7.07k stars 1.62k forks source link

404 call to .../VvvebJs/none #229

Open alimovz opened 2 years ago

alimovz commented 2 years ago

Before I dig into this issue, I wanted to post this question to see if anybody has run into it and if there is an easy solution. I just deployed VvvebJs on my dev box and the editor seems to work for the most part. But I get these errors in the console when I click on editable blocks: Image of screenshot

Does anybody have any idea what might be causing these?

oleteacher commented 2 years ago

Search for "none" in open issues. You may have to translate to english, but this helped me:

https://github.com/givanz/VvvebJs/issues/223

alimovz commented 2 years ago

Search for "none" in open issues. You may have to translate to english, but this helped me:

223

I did search for "none" in open issues prior to posting this one. And I did, in fact, run into the question in French. And since I don't speak it, my assumption was that they are asking about the same thing and the reason there is no answer is because it is, well, in French. Hence the new issue.

Anyway, for those running into the same thing, here is what the Frenchman says: In the libs/builder/plugin-media.js file, on line 13, add this condition if (value !== 'none') like so: if(value !== 'none') $('img', this.element).attr("src",value);

Uncertain if this is the right solution, but it does stop the error.

oleteacher commented 2 years ago

Look, I was not trying to be a smartass, only trying to help you with what solved issue for me.

givanz commented 2 years ago

Hi

This bug was caused by empty images that had "none" value that caused a http request to http://none and was fixed in a previous commit https://github.com/givanz/VvvebJs/blob/master/libs/builder/plugin-media.js#L10