Text preview ok. live site not

dear support, please have a look into the secure note. thanks! kai

Hi Kai,

Thanks for reaching out.

It appears that HTML entities are added instead of actual HTML markup. Have you added it in text element directly or with the inline editing feature too?

Though, I can’t confirm what caused it yet, but please make sure to add trough text mode(instead of visual) of the text element.

Would you mind providing your admin login credentials in a secure note so I could check?

Thanks!

hi rad,
thanks for coming back so quickly!
i forgot to mention:
i tried pasting the text in text mode, visual mode and inline text modul.
i tried the text classic modul and the v2 modul.
also i copied the text directly from the other mentioned website to the other one.
for me that is more than strange. especially because it looks fine in the live preview of cornerstone.
thanks again, kai

Hello Kai,

This should not happened. Maybe you have copied the code from MS machine which most of the time will automatically change html tags to html entities. Are you inserting this code?

This issue is unique to your installation only. Would you mind providing us access to your site so we can investigate?

Kindly let us know how it goes.

dear rue nel!
thanks again! i copied the code directly from one x installations text block to the other x installations text block.
the preview in the editor is correct. the preview of the page when using the preview button (second last in the left column of cornerstone is wrong. the live site is wrong.
using your code here produces the best result so far. only the colors of the icons are gone and the whole text is centered (something is experience regularly and also cannot explain).
please have a look. at the page now. also at the secure note.
thanks a lot! kai
ps: also i experience across several installations an unresponsiveness of cornerstone. clicking on close buttons or any buttons does not work anymore. i have to open a new window for the page and start cornerstone again. very annoying!

Hello @iTurtle,

I have logged in and fix the issue. It was the way the code were inserted. You must have copied and pasted the converted html entities.

Please check your site again.

dear rue,

thanks for your help! what exactly did you do? or what did i do wrong? and why does it look ok in the editor before publishing? i need to understand these things.
but where are the colors of the icons and why it the one text still centered?
please read my comments above for more information about both issues.

thanks a lot! kai

Hello Kai,

I just simply made sure that what I pasted does not contain any html entities and that the html code is valid and correct. You can see in the left side of the screenshot that <p>, <a> and other tags were correct and not the ones that is displaying like before.

Hope this make sense.

dear rue,
thanks again! so what you say is, that you fixed the code manually?
i still don’t get why the code was broken. i copied a perfectly fine code from the one website to the other. same version of x installation. same html text window of cornerstone.
i noticed that this does not work properly in the first place. in the end i had to copy the code not from the html window (which i would prefer because of less potential errors) but from the visual editor window. only then the preview looked ok. but not the published page.
this is not very straightforward and not how it should be in my opinion.
so i am asking again. what did i do wrong and how should it work?
thanks again for your patience! kai

Hi Kai,

Hope you have a great day, and I’ll explain it based on my personal understanding of the builder’s code.

If the content contains invalid HTML that affects the wrapping container, then it could happen. It’s the same when <pre> is left open then the entire content became codes. There are many possible reasons but the cause is all the same, invalid markups.

Another possible cause is failed data processing due to invalid HTML markup like the portion is processed while the other is treated as standard text. Please note that the contents added are also subject to Wordpress processing and parsing like the hooks attached to the_content.

Though I can’t reproduce any of that and it’s only specific to the HTML content that you’re adding. May I request a video recording and the document so we could try it on our installation?

And the explanation why it works within the builder preview is because of html_entity_decode(), it’s a way to fix HTML entities added once it’s retrieved from serialized data of the database. Hence, the issue of HTML entities already presents the time it is added and saved but only retrieved and pre-processed by cornerstone.

$data[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );

But this is only applicable for the preview and cornerstone shouldn’t alter what’s actually displayed by Wordpress in the front.

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.