• How do I begin? I’ll try this approach.
    I create a new page and add a code snippet. Yesterday, the code snippet used had a lot of PHP and HTML and Javascript. The snippet code was run as a unique page outside of WordPress and it worked perfectly.
    But when I included the same code in a snippet and ran the page the <script> and <style> tags just disappeared. Not from the code, but from the browser previews.

    What i did to fix the problem:

    I left the snippet i had created alone.
    I deleted the wordpress page
    I used the EA Duplicator function to duplicate a page that had some snippet code working properly.
    I then renamed the page.
    I opened the page for edit and changed the code snippet id to the one that was testi and I was trying to use on the newly created page.

    Note: The design of both pages are in Elementor and only contain a Title and the Text box with the code snippet. So it wasn’t a big deal to duplicate an old working to the new page.

    I then saved the page.
    Guess what. The code snippet worked perfectly. Actually you could see that it was going to work right on the Elementor edit screen.

    After that, I could edit the code snippet and page at will with no further problems.
    That is until I try and create a NEW page and add a code snippet. Anything might happen and tags will disappear.

    I see the missing tags in the browser preview and the Elementor page screen. I use the inspect function on the browser and can see the missing tags.
    The missing <Script> the browser displays the contents of the <script></script> tags instead.
    The browser I was using was Firefox. I haven’t tried this on any other browsers, so they might be different.

    Obviously I had a new page with a snippet that worked once, or I wouldn’t have had a good page to copy to create new pages that would have snippets.

    I haven’t tried just grabbing a page and adding a snippet to see if the problem presents itself. I give that a try and update this post.

    Any insight would be greatly appreciated. A Fix would be nice. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jaybunten

    (@jaybunten)

    I’ve checked out if the tags are missing if you insert a code snippet into a page that does not have any snippets.
    Yes, doing that also fails and the <script> <style> tags were missing.

    I also checked if the problem existed on another browser. And yes Chrome also behaves same as FireFox.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @jaybunten,

    Can you clarify whether you were adding this as a Functions or Content snippet? If a Content snippet, which options do you have enabled?

    Thread Starter jaybunten

    (@jaybunten)

    Shea,

    Thanks for the reply.

    They are PHP functions along with HTML that uses the functions and communicates with the viewer. The only Snippet option checked is Evaluate PHP.

    The Code Tab is HTML. I tried PHP and bad things happened. While I don’t know what the difference means for the snippet, I’ve have stayed with HTML.
    The snippets are invoked with a textbox. It is usually the only thing on the page other than the template and a heading box.

    Since I wrote the tread, I’ve put the site online for testing. If you would think it would help I can give you access and you can see directly.

    I did try it using the public host (Shared Hosting Service on HostMonster). My testing server is IIS. The URL is https://newwp.cedarridgeranch.org . The problem remained.

    All the snippets on the online site are working correctly because I used my work around to make that happen.
    Quite a few of the snippets (3) make up most of the right sidebar that displays the weather, local conditions and the donation history.

    Let me know if you need anything else.
    I can also give you access as I wouldn’t consider the totally site live.

    P.S.
    What I’m doing is converting a very old https://www.cedarridgerach.org to WordPress. I’m trying to do the minimum amount of work with the admin and data display functions of the site. So I found the Snippet trick I’m using (with the one minor hiccup).
    It works really fast converting the PHP and HTML from the old pages quickly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML tags appear to be missing’ is closed to new replies.