flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.37k stars 835 forks source link

nojs being set on slow connections #417

Closed jenolan closed 8 years ago

jenolan commented 9 years ago

This code in flarum/vendor/flarum/core/views/app.blade.php

        <script>
          try {
            var app = System.get('flarum/app').default;

            babelHelpers._extends(app, {!! json_encode($app) !!});

            @foreach ($bootstrappers as $bootstrapper)
              System.get('{{ $bootstrapper }}');
            @endforeach

            app.boot();
          } catch (e) {
            @if (! $forum->attributes->debug)
                window.location = window.location + '?nojs=1';
            @endif
            throw e;
          }
        </script>

Is timing out too quickly in slow links, at the moment from 0800-2300 my internet is restricted to 128kbs the Flarum discussion area keeps saying I have an old browser, if I manage to be on in the non-blocked time it works fine most of the time but sometimes also clags up as I am on satellite and sometimes loading takes a while, think whatever is 'timing out' (I assume that's the trigger) needs to be loosened a bit for slower connections.

jenolan commented 9 years ago

After some digging the exception is at var app = System.get('flarum/app').default; message 'ReferenceError: System is not defined'

tobyzerner commented 9 years ago

That implies that your JavaScript hasn't been compiled correctly... Is this an installation you have compiled yourself (via git clone, gulp, etc.)?

jenolan commented 9 years ago

It is your site ie http://discuss.flarum.org/

tobyzerner commented 8 years ago

So there is no explicit timeout in Flarum, if the connection is dodgy then the browser might just be giving up in which case there's nothing we can do from our side.