Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 12, 2020 @ 06:57
    Hieu Nguyen Trung
    0

    Conflict with WebMarkupMin

    Hi, I'm testing uMarketingSuite, my site already installed MissingCode.Umbraco.HtmlMinifier (https://our.umbraco.com/packages/developer-tools/html-minifier/) but when I change debug mode to false to let html minifier work as it is on PROD environment, it does not work as expected. It seems there is some conflict, can you please double check?

  • [email protected] 408 posts 2138 karma points MVP 8x c-trib
    Aug 12, 2020 @ 12:43
    jeffrey@umarketingsuite.com
    0

    Hi Hieu Nguyen Trung,

    thank your for your report. Unfortunately it's impossible for us to give support to all packages and this packages is not one on our list to be tested.

    It does sound weird though because we do not do much with the frontend of someone's website.

    If you say: "it does not work as expected" could you give some more details? What did you expect? And what was the result? Some screenshots will probably be very usefull.

    And if you can give me some more information about the Umbraco version + uMarketingSuite version you're using, then may be I can help you out.

    Kindest regards,

    Jeffrey

    enter image description here

  • Yakov Lebski 591 posts 2345 karma points
    Aug 12, 2020 @ 12:50
    Yakov Lebski
    0

    I can assist with HtmlMinifier issues, can you provide details about the issuse, is it backoffice or front?

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 12, 2020 @ 15:09
    Hieu Nguyen Trung
    0

    Hi Jeffrey and Yakov,

    Thank you so much for your response.

    When I have HtmlMinifier + uMarketingSuite, the result is like this

    issue

    which break the whole page apart.

    I tried to remove uMarketingSuite only (keep all other dependencies of it), and HtmlMinifier works, the html is minified with no big gap as above.

    The issue only happens on frontend.

    I am using:

    Umbraco 8.6.4
    uMarketingSuite 1.3.0
    HtmlMinifier 1.0.1
    WebMarkupMin.Core 2.8.6
    WebMarkupMin.AspNet.Common 2.8.8
    WebMarkupMin.AspNet4.Common 2.8.1
    WebMarkupMin.AspNet4.Mvc 2.8.1
    
  • Yakov Lebski 591 posts 2345 karma points
    Aug 12, 2020 @ 16:47
    Yakov Lebski
    0

    Minifier should remove spaces html and also can shortage tags. What issues do you see on the front?

    Look like stange tags inside a, can you show tag without minification? enter image description here

    can you add this key in app settings

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 02:03
    Hieu Nguyen Trung
    0

    Hi Yakov,

    What key did you mean please?

    I've tried with a fresh installation of Umbraco and the issue still persist.

    enter image description here

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 02:05
    Hieu Nguyen Trung
    0

    without HtmlMinifier, the html should look like this

    enter image description here

  • Yakov Lebski 591 posts 2345 karma points
    Aug 13, 2020 @ 03:04
    Yakov Lebski
    0

    add this key in web.config in appSettings section

     <add key="RemoveOptionalEndTags" value="true" />
    

    can you explaing what issue do you experience?
    can you removi HtmlMinifier dll from bin, is it worked correctly?

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 03:08
    Hieu Nguyen Trung
    0

    I followed your recommendation and the issue still persists

    enter image description here

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 03:09
    Hieu Nguyen Trung
    0

    The issue is, HtmlMinifier does not work correctly after installing uMarketingSuite, I want to keep HtmlMinifier as I've been using it for a while in many projects.

  • Yakov Lebski 591 posts 2345 karma points
    Aug 13, 2020 @ 03:15
    Yakov Lebski
    0

    I'll try to reproduce it

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 03:34
    Hieu Nguyen Trung
    0

    You just need to have a fresh installation of Umbraco with Starter Kit, then install HtmlMinifier and check, after that install uMarketingSuite and check again.

  • Yakov Lebski 591 posts 2345 karma points
    Aug 13, 2020 @ 04:02
    Yakov Lebski
    0

    or now I see what on clean installation of Umbraco and HtmlMinifier it is working correctly, after installation of uMarketingSuite it has some strange behavour in html. I'm continue inverstigation

  • Yakov Lebski 591 posts 2345 karma points
    Aug 13, 2020 @ 04:32
    Yakov Lebski
    1

    looks like some html added when both plugin are installed enter image description here

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 13, 2020 @ 04:59
    Hieu Nguyen Trung
    0

    Does this from uMarketingSuite or the WebMarkupMin itself?

  • [email protected] 408 posts 2138 karma points MVP 8x c-trib
    Aug 13, 2020 @ 06:07
    jeffrey@umarketingsuite.com
    0

    Hi Hieu Nguyen Trung & Yakov Lebski,

    this is really strange, but thank you for the screenshots and the research!

    @Yakov: Any clue how this could happen? Can you maybe elaborate on how the minifier works? Maybe this gives us a hint where this could come from?

    Thanks!

    Jeffrey

    enter image description here

  • Yakov Lebski 591 posts 2345 karma points
    Aug 13, 2020 @ 12:35
    Yakov Lebski
    0

    HtmMinifier just wrap WebMarkupMin,

    when I try use

    Clean Umbraco + with default starter kit + uMarketingSuite => works good Clean Umbraco + with default starter kit + HtmlMinifier =>works good

    Clean Umbraco + with default starter kit +uMarketingSuite + HtmlMinifier =>stange html generated

    Does uMarketingSuite modify html after generation by Razor?

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    Aug 14, 2020 @ 15:22
    Daniël Knippers
    1

    Looks like WebMarkupMin also uses a filtered Stream concept to apply the minification. This stream wraps the HttpResponseBase.Filter stream and when it's closed at the end of a request will minify all content written to it.

    We actually use the same principle but clearly these two don't work together properly when wrapping each other, seems like WebMarkupMin wraps our stream as their ActionFilter runs on ResultExecuted and we on ResultExecuting.

    I reproduced the issue and tried some quick fixes in our code. I did get some working minified output together with uMarketingSuite content (we append some <script> tags for example) so that looks promising. I could get rid of the strange characters at least. It wasn't working 100% yet but I assume we can get this to work sometime in the near future.

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    Aug 17, 2020 @ 08:22
    Daniël Knippers
    100

    We have implemented some changes to our filtered stream and it seems to have been resolved now. Minification works and UMS content is inserted as well. This should be released in 1.4.0 which is scheduled for 2 weeks from now (week of 31 aug - 4 sep).

  • Hieu Nguyen Trung 14 posts 103 karma points
    Aug 17, 2020 @ 08:29
    Hieu Nguyen Trung
    0

    That's good news, thanks Daniel, looking forward to continue testing uMarketingSuite :)

  • [email protected] 408 posts 2138 karma points MVP 8x c-trib
    Sep 06, 2020 @ 14:08
    jeffrey@umarketingsuite.com
    0

    Hi Hieu Nguyen Trung,

    last week we've released uMarketingSuite 1.4 and this issue is fixed in this version.

    Hopefully you can verify that as well!

    Kindest regards,

    Jeffrey

    enter image description here

  • Hieu Nguyen Trung 14 posts 103 karma points
    Sep 11, 2020 @ 06:48
    Hieu Nguyen Trung
    0

    Hi Jeffrey, Apology for late response, as tested, the bug is now fixed :). Many thanks, Hieu.

Please Sign in or register to post replies

Write your reply to:

Draft