Hello Ben + Hakan

Not sure if this is off topic, but I experienced a minification-related
problem also - across various browser types, not only IE 11.

Page loading mask ("spinning wheel") never disappears. Problem also is in
core.js as I understand the JS debugger. See my comments in TAP5-2605
<https://issues.apache.org/jira/browse/TAP5-2605> for details.

My workaround is to disable minification altogether, which is ok for my
small webapp, but I appreciate the code you shared, Ben.

Volker


Am Di., 27. Okt. 2020 um 10:39 Uhr schrieb Ben Weidig <b...@netzgut.net>:

> Yes, that's the closure compiler:
>
> https://github.com/google/closure-compiler/issues/3280
>
> The effect of the symbol is that no minimizer won't be run, so no CSS and
> JS minification.
>
> We added a request filter to restrict disabling minification to IE11:
>
>  @Contribute(RequestHandler.class)
>     public static void
> contributeRequestFilter(OrderedConfiguration<RequestFilter> conf,
>                                                UserAgentDetector
> userAgentDetector) {
>         conf.add("IE11-underscore-fix", new RequestFilter() {
>
>             @Override
>             public boolean service(Request request, Response response,
> RequestHandler handler) throws IOException {
>                 Optional<UserAgent> currentUserAgent =
> userAgentDetector.current();
>                 currentUserAgent.ifPresent(userAgent -> {
>                     Browser browser = userAgent.getBrowser();
>                     if (Browser.IE == browser.getGroup()) {
>
> request.setAttribute(TapestryConstants.DISABLE_JAVASCRIPT_MINIMIZATION,
> Boolean.TRUE);
>                     }
>                 });
>                 return handler.service(request, response);
>             }
>         });
>     }
>
> UserAgentDetector is a custom service from us, not Tapestry.
>
> It could be improved to just blacklist the non-working source files, and
> not disable it for every JS and IE 11.
>
> Ben
>
>
>
> On Tue, Oct 27, 2020 at 10:30 AM Hakan Sahin <sa...@avetana.de> wrote:
>
>> Thank you for your response.
>>
>> The error message occurs on core.js(121,20). I put the screenshot and the
>> cursor shows the position 20 below.
>>
>> Disabling MINIFICATION_ENABLED worked. I can not see the error on the
>> console any more. But did that has an effect for the web app in production
>> mode?
>>
>> I am using Tapestry 5.6.1.
>>
>> Thank you and regards,
>> H.Sahin
>> Am 27.10.2020 um 10:08 schrieb Ben Weidig:
>>
>> Hi,
>>
>> does the problem occur in production only, or also in dev?
>>
>> We had some issues with Google Closure Compiler and IE11 in the past,
>> optimizing "too much".
>>
>> You could try to disable minification to narrow the problem
>> down: org.apache.tapestry5.SymbolConstants.MINIFICATION_ENABLED
>>
>> Or you can check the core.js file received in the browser, too see the
>> actual JS that IE11 doesn't like.
>>
>> I couldn't recreate your error, even though we're running 5.6.0. But
>> there weren't changes to coffee files in 5.6.1 as far as I know.
>>
>> Ben
>>
>>
>
> --
>
> Netzgut GmbH
>
> Kirchstr. 18
> 69115 Heidelberg
>
> Telefon:
> +49 6221 39298 53
>
> Telefax:
> +49 6221 39298 59
>
> E-Mail:b...@netzgut.net
>
> Handelsregister: Amtsgericht Mannheim, HRB 709833
> Sitz der Gesellschaft: Heidelberg
> Geschäftsführer: Felix Gonschorek, Benjamin Weidig
> Ust-IdNr.: DE272871752
>
>

Reply via email to