Replacing link in “Raw HTML” WPBakery
-
Any chance the plugin will be able to replace the link in a Raw HTML block of WPBakery? Thanks
-
Hi @alessandroburo,
It should be able to do it. 🙂 If it doesn’t, can you please let us know, step by step, including examples of raw HTML blocks, how to reproduce the issue?
Thanks!
Hey Gerard, unfortunately doesn’t work on my side.
I can’t share the log data since is a company project but here below you can see my settings:
Host: Bluehost
WP version: 5.8.1
Theme: AstraMain plugins:
WPBakery Page builder 6.6
FileBird 4.9.3
Enable Media Replace 3.6.0Page structure:
– Wp-bakery row
– Tabs element
– 3 columns row (in the tab)
– raw HTML in the columnRaw HTML (here the css code as well http://jsfiddle.net/prw73rL9/):
<div class="dropdown"> <span>Downloads</span> <div class="dropdown-content"> <div class="row"><a href="https://mysite.com/wp-content/uploads/2021/10/myfile_v1.zip">download</a></div> </div> </div>(I’m not using a button because I will have multiple files in the dropdown div)
My actions:
Media file library -> subfolder created with FileBird -> myfile_v1.zip -> Replace media -> Upload a new file -> myfile_v2.zip -> Replace file, use new file name and update all links option -> save.Thank you for your help!
-
This reply was modified 4 years, 7 months ago by
alessandroburo.
-
This reply was modified 4 years, 7 months ago by
alessandroburo.
Thank you, @alessandroburo.
I’ll forward the issue to our developers, try to reproduce it, and we’ll update you when we find a solution. No ETA for this, sorry!
Best,
Hi @alessandroburo,
Can you please update WPBakery to the latest version and check if you can still reproduce the issue?
Thanks!
Hi Gerard, yes, the issue is still there. All plugins updated
Thank you
Thanks, @alessandroburo,
I’ll forward the issue to our developers and if we have any questions, we’ll let you know.
Best,
Hello @alessandroburo and thanks for reporting this!
I reproduced the setup you described and indeed this case isn’t handled by our plugin, because of the way the “Raw HTML” data is stored by WP Bakery inside the DB. It looks like this:
[vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJkcm9wZG93biUyMiUzRSUwQSUyMCUyMCUzQ3NwYW4lM0VEb3dubG9hZHMlM0MlMkZzcGFuJTNFJTBBJTIwJTIwJTNDZGl2JTIwY2xhc3MlM0QlMjJkcm9wZG93bi1jb250ZW50JTIyJTNFJTBBJTIwJTIwJTNDZGl2JTIwY2xhc3MlM0QlMjJyb3clMjIlM0UlM0NhJTIwaHJlZiUzRCUyMmh0dHBzJTNBJTJGJTJGYW5vdGhlci5kb2JyZXN0aWkucm8lMkZ3cC1jb250ZW50JTJGdXBsb2FkcyUyRjIwMjElMkYwOSUyRnJpZ2h0LXNtYWxsLnBuZyUyMiUzRWRvd25sb2FkJTNDJTJGYSUzRSUzQyUyRmRpdiUzRSUwQSUyMCUyMCUzQyUyRmRpdiUzRSUwQSUzQyUyRmRpdiUzRQ==[/vc_raw_html]As you can see, the content of the Raw HTML isn’t stored in plain text in the DB (which makes sense, from a security perspective), therefore our plugin won’t be able to handle this case, unfortunately. Our plugin is searching inside the DB for the replaced image link and then updating it with the new one. We’ll check with the WP Bakery team if they have a way to decode the content of the Raw HTML box from the code, as this could enable us to update the URL of a replaced image, but I honestly don’t expect a very quick answer from them.
The alternative would be to always replace the image keeping exactly the same name, as in that case a search & replace wouldn’t be necessary and it will all work.
Thanks again for reporting this and for your understanding of the situation.
Pedro Dobrescu
-
This reply was modified 4 years, 7 months ago by
The topic ‘Replacing link in “Raw HTML” WPBakery’ is closed to new replies.