Adding html code in embed makes page content disappear
When I add code to embed I get this. on one website where the code already exists, I can no longer edit the page, on another website where I'm adding the code for the first time, if I exit I can get back in.
The code I'm adding is
<p style="color:white">Copyright <sup>©</sup> <script>document.write(new Date().getFullYear());</script> | DW Dunn Ltd. Company no. 04125102 Registered in England & Wales</p>
Preview shows the page with content, as does the live page https://qiexe.co.uk/about-us/
On this website - the code is in the global footer
I'm using Brizy Version 2.4.17 & Brizy Pro Version 2.4.16
-
Hi Sonia,
Thank you for reaching out to us.
Unfortunately, document.write() breaks the layout or functionality of Brizy page builder.
You could consider using the modified script instead, which will give the same result.
<p style="color:white">Copyright <sup>©</sup> <span class="yr"></span> | DW Dunn Ltd. Company no. 04125102 Registered in England & Wales</p>
<script>
document.querySelector(".yr").textContent = (new Date().getFullYear());
</script>We've tested the above script on this URL - https://staging.server001.xyz/docwrite/
Please try this and let us know how it goes.
Best regards,
Ariel H.0 -
I'll test it on the website without the embed but how do I get in to edit the website where the code already exists and I just get the screenshot provided?
0 -
Hi Sonia,
Thank you for the update.
This is a tricky issue, but it should be resolved quickly if this script is used in a global footer.
Please try these steps.
- Ensure that you have a full backup of your site.
- Disable all other plugins besides Brizy
- Install the WP Rollback plugin, this allows you to rollback Brizy to an earlier version.
- After you have rolled it back to an earlier version, you should be able to go to those pages that were affected and modify the embedded custom code. Please ensure that it's copied exactly as it is and save your changes.
- After modifying the script, please go back to the plugins area and update Brizy to the most recent version.
- Enable all other plugins and check if you can edit those pages.
I have made a short screencast to demonstrate the above steps on this link:
https://youtu.be/KmjN9ZvwRPgI hope this helps.
Best regards,
Ariel H.0 -
Hi Ariel,
Thanks for the steps, they look straight forward but the video is marked as private
0 -
could you also confirm which Brizy version I should roll back to please
0 -
Hi Sonia,
Sorry about that, I didn't notice that it was set to private. Please try it again.
It was rolled back to Version 2.4.15.
Let me know how it goes.
Best regards,
Ariel H.0 -
Hi,
I rolled back but it wouldn't let me edit the global footer due to needing Brizy Pro. I tried enabling that but it wouldn't work with the older version.
So - my workaround - (fortunately on this site, the embed was in a block of it's own) was to delete the block on every page. I do have some websites with this issue where tht is not the case. Can you advise why my website didn't behave as your demo?
0 -
Hi Sonia,
Thank you for the update.
You won't be able to access the global footers since they are Pro features, which explains why the padlock icon appeared. I should have included this in my previous instructions. That didn't cross my mind, I apologize for that.
In case you have websites having the same issue, you will also need to install an earlier version of Brizy Pro, which you can find at the below link:
Brizy Pro 2.4.14: https://jmp.sh/HkyItjtoIf you have any further questions, please let me know.
Best regards,
Ariel H.0
Please sign in to leave a comment.
Comments
8 comments