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?
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.
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.
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.
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
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.
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).
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?
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
I can assist with HtmlMinifier issues, can you provide details about the issuse, is it backoffice or front?
Hi Jeffrey and Yakov,
Thank you so much for your response.
When I have HtmlMinifier + uMarketingSuite, the result is like this
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:
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?
can you add this key in app settings
Hi Yakov,
What key did you mean please?
I've tried with a fresh installation of Umbraco and the issue still persist.
without HtmlMinifier, the html should look like this
add this key in web.config in appSettings section
can you explaing what issue do you experience?
can you removi HtmlMinifier dll from bin, is it worked correctly?
I followed your recommendation and the issue still persists
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.
I'll try to reproduce it
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.
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
looks like some html added when both plugin are installed
Does this from uMarketingSuite or the WebMarkupMin itself?
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
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?
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.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).That's good news, thanks Daniel, looking forward to continue testing uMarketingSuite :)
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
Hi Jeffrey, Apology for late response, as tested, the bug is now fixed :). Many thanks, Hieu.
is working on a reply...