WordPress.org

Ready to get started?Download WordPress

Forums

WP-HTML-Compression
[resolved] Occasionally breaks scripts (11 posts)

  1. Naz
    Member
    Posted 2 years ago #

    Hello,

    I was having a problem with Rafflecopter earlier, where the widget refused to load in my post. I found out it is the WP-HTML-Compression plugin that somehow removed my JavaScript and stopped the widget from loading.

    Will this be fixed in a future release? I really like this plugin and it's a shame I can't use it because of this problem.

    Thanks for the help!

    http://wordpress.org/extend/plugins/wp-html-compression/

  2. Marventus
    Member
    Posted 2 years ago #

    Hi.
    Could you post a link to your site? Perhaps there is a way to avoid code breakage.
    Thanks!

  3. Naz
    Member
    Posted 2 years ago #

    I disabled the plugin for now, because there's a giveaway going on right now (and the widget disappears once I activate the plugin), but the link to my site is http://www.justhonest.net. The link to the widget code can be found here: http://www.rafflecopter.com/rafl/share-code/ZGZlNDA5NTZiZDRmZDU4N2JjMjhmM2RjZDZhY2MwOjA=/

    Thanks for your help!

  4. Marventus
    Member
    Posted 2 years ago #

    Try to set the type attribute in your JS script call to see if that makes a difference:

    <script type="text/javascript" src="//d12vno17mo87cx.cloudfront.net/embed/rafl/cptr.js"></script>
  5. Naz
    Member
    Posted 2 years ago #

    I added the 'type' attribute as you suggested, but unfortunately the widget still doesn't show up when I activate the plugin.

    Thanks for your help. I appreciate it!

  6. Marventus
    Member
    Posted 2 years ago #

    That is so weird.
    Could you do a Pastebin of your home page's HTML code with the WP-HTML-Compression turned on? It doesn't have to be from your production: a dev environment would suffice.
    Thanks!

  7. Naz
    Member
    Posted 2 years ago #

    Here you go: http://pastebin.com/BCKRXHgq

    Thanks for your help!

  8. Marventus
    Member
    Posted 2 years ago #

    Hi, I took a look at your code. Other than a few validation errors and a lot of inline scripts (both JS and CSS), I don't see anything in there that could be affecting your giveaway script.
    I did notice that your giveaway script's src tag is truncated and it's missing the http:// part. Try including a full URL path in the src see if that makes a difference.
    Another source of the problem could be a plugin or JS library incompatibility, but I don't see why that would affect your external JS script.
    I'll keep scratching my head see if I can find anything else, ;-)

  9. Marventus
    Member
    Posted 2 years ago #

    Hello again,

    I grabbed the code you pasted and made some changes and observations to it. You can find the new paste here. You can use the "compare" feature to see what's different, and/or look for

    <!-- Marventus

    in the code to find my comments.
    Try addressing those validation errors see if there is any progress.

  10. Naz
    Member
    Posted 2 years ago #

    Hello,

    Thanks so much for your help. I really appreciate it! Unfortunately, most of the code you commented on was added by plugins, and I'm not comfortable editing these plugin files because they will be overwritten after each update.

    Does this mean this plugin will not work for me if these issues remain unchanged?

    Thanks for your time!

  11. Steven Vachon
    Member
    Plugin Author

    Posted 2 years ago #

    A new version will be released in the next few days with this issue resolved. You may want to schedule a day to remove your compression override comment tags.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic