Tagged: Code block, Special characters
-
AuthorPosts
-
November 10, 2020 at 7:43 pm #1259652
Hi,
I have a 3rd party form I am trying to insert in a code block. Inserting it works fine (despite the warnings in red below the entry) however, when I go back to the page, the block is broken and I am unable to edit. I tried replacing the <>[] with the suggested ###gt###, ###lt###, ###91###, ###93### but the front end just displays the raw code instead. Help!
Thanks
AmandaNovember 11, 2020 at 8:34 am #1259786Hi Amanda,
The default WordPress login URLs are not working on your site, please share the login URL in private as well.
Best regards,
RikardNovember 11, 2020 at 7:56 pm #1259948Sorry about that. The URL is below.
November 12, 2020 at 1:02 pm #1260110Hi,
Thanks for that. The code block on the contact page looks broken unfortunately, could you share the full code which you are trying to use please?
Best regards,
RikardNovember 12, 2020 at 6:24 pm #1260188Hi! Code below in private section…
November 14, 2020 at 4:48 am #1260430Hi,
Thanks for that. I tried the code you posted on a local installation, but it’s breaking the code block element unfortunately. I tried it in a WordPress widget as well, but it’s not working there either. Please see screenshot in private. There looks to be something wrong with the code you are trying to use, could you try to reach out to the authors of the code to see if they can help you out please?
Best regards,
RikardNovember 16, 2020 at 7:25 pm #1260774OK will do – thanks for your help.
November 20, 2020 at 8:06 am #1261720Dear all, I am facing the very same issue as stated above. Pls see code-snippet shared in private content.
I have followed all steps mentioned in https://kriesi.at/documentation/enfold/intro-to-layout-builder/#using-special-characters
But no success yet.
Thanks for sharing some thoughts on this one, Christoph.November 21, 2020 at 6:30 am #1261894Hi Christoph,
Where can we see and reproduce the problem you are having? Also, what is the code you posted supposed to do? You could try to replace all ” characters with
"
and all ‘ characters with
'
to see if that works.
Best regards,
Rikard- This reply was modified 4 years, 1 month ago by Rikard.
November 23, 2020 at 2:42 pm #1262387Hi Rikard,
thanks for following-up. I have tried out your recommendation but no luck.
Enfold is throwing:
Warning: Characters <,>,[,] might break ALB backend or frontend. Read more if you want to use them.
Hence, the issue lies within < > and [ ].Use Case on my end:
This code wraps a Mautic-form as manual copy in order to cope with decent styling.
Main-connection to Mautic is being established by Plugin: https://wordpress.org/plugins/wp-mautic/
This has been working fine ever since. Just recently, I am getting this warning in Enfold-Code-Block.
And once I publish a page, backend is getting corrupted and I can no longer edit an existing page.Let me share creds below for reproduction on your end.
Thanks.November 27, 2020 at 5:12 am #1263445Hi,
Thank you for the inquiry.
You may need to use this plugin in order to properly use those symbols in the text or code block element.
As described above, you will have to use special placeholders for the symbols such as ###lt### for less than symbol or ###gt### for greater than symbol and the plugin will then convert these placeholders to the actual symbols in the front end.
Best regards,
IsmaelNovember 27, 2020 at 8:48 am #1263465Hi Ismael, thanks a lot for sharing. I have executed all mentioned steps.
Current Result:
Content of Code-Block is shown as clear-text after publishing the page.Expectation:
Code-Block should show formatted form.Thanks for sharing further insights on this one.
Christoph.November 28, 2020 at 2:47 am #1263629i’m in the same boat as @cz – the “Code Block” seems to be useless lately. i used to be able to enter <style>css code</style> and <script>js code</script> and any other html. but now, it’s ignored. if i replace all the greater-than/less-than symbols with ###lt### and ###gt### then all the code is simply printed in plain text on the frontend webpage.
and yes, i have the special characters plugin installed & activated.
this didn’t used to be an issue. i noticed the red warning text “Warning: Characters <,>,[,] might break ALB backend or frontend. Read more if you want to use them.” appeared recently after an update – i’m not sure if it was a WordPress update or Enfold update (or both) that caused this.
is it possible to have custom code like we used to with the Code Block? is there another method of entering custom code that will work as expected?
thanks.November 28, 2020 at 3:00 am #1263630fyi, just discovered if i minify the code, then it seems to work (at least in my single test instance). curious if others try this if it works consistently.
to be clear, i have a Code Block and in it put…
<style>minified single line of css code here</style>
<script>minified single line of js code here</script>November 28, 2020 at 5:59 am #1263647Hi SyberKnight,
Could you share example code which is not working please?
Best regards,
RikardNovember 30, 2020 at 9:14 am #1263882Hi @SyberKnight – @Rikard – thanks for sharing. The code itself is working when published with special characters. The issue on my end is that once the page is published it does affect backend and I can no longer edit an existing page. Need to start from scratch for every single page. – FYI. Thanks.
December 1, 2020 at 4:38 pm #1264274Hi,
I actually missed the info about adding internal styles. Adding internal style using the code block element should work fine even without the plugin that we mentioned above.
Adding this css style in a code block works properly on our own installation.
<style> body { display: none !important; } </style>
Please test it on a fresh installation without plugins to see if it works.
Best regards,
IsmaelDecember 1, 2020 at 6:15 pm #1264297Hi @ismael – thanks a lot for sharing.
Tested with a plain instance running on enfold 4.5.6 – in this scenario, the alert for special characters in code-snippet does not prompt and the site as well as edit-mode in enfold are working fine.
However, doing the same steps on my PROD-instance with enfold 4.7.6.4, I can add the code along with the style. After publishing, the site works fine and the integrated form with styles is being shown as expected.
Current issue remains:
Navigating to edit-mode of the published page is breaking back-end and does show edit-mode in non-workable way.I am still at the starting-point. Hope you do have some additional hack ready.
Thanks for following up on this one.
December 4, 2020 at 5:12 am #1264938Hi,
Current issue remains:
Navigating to edit-mode of the published page is breaking back-end and does show edit-mode in non-workable way.Do you mean that you cannot edit the text block after adding the style? Please post the style or code that you are trying to add to the code block using pastebin so that we could test it on our own installation.
Best regards,
IsmaelDecember 4, 2020 at 11:05 am #1264970Hello, I also have display problems, I added your plugin, modified the code as you indicate, but it’s buggy! Need help please
December 4, 2020 at 11:16 am #1264972Hi Ismael,
correct, after pasting to Code-Snippet and publishing the page, editing page is no longer working.
Let me add contents below as private.
Thanks for checking on this one.
December 7, 2020 at 9:08 am #1265416Hi,
@laurent: You do not have to use the conversion plugin for that snippet. Please try to add the snippet as is without using the placeholders for the less and greater than symbols.
@cz: It is probably not working because of the textarea or the input fields. You may need to create a custom shortcode for the form or the input fields so that you do not have to embed them directly in the code block. Please check the shortcode API on how to create custom shortcodes.// https://codex.wordpress.org/Shortcode_API
Best regards,
IsmaelDecember 7, 2020 at 9:35 am #1265421Hi @ismael – thanks a lot for your input.
Tested with https://wordpress.org/plugins/shortcoder/
Result: working as expected.
Thanks, Christoph.December 8, 2020 at 12:23 pm #1265732 -
AuthorPosts
- You must be logged in to reply to this topic.