scripting/river5

Homepage HTML problem for Firefox on Ubuntu

Closed this issue · 7 comments

Pointing the Firefox browser (44.0.2) running on Ubuntu (15.10) at a river server (either river4 or river5 on localhost or a remote server) displays only a (mostly) unformatted "Stuff" menu.

It works correctly when using the Chromium browser (48.0.2564.116) or the same version of Firefox on Windows.

The web console on the failing browser complains about a

ReferenceError: $ is not defined

regarding the line near the end of the home page html that reads

$(document).ready (function () {

I opened the file

http://rss2.io/code/feedtools/misc/serverhomepage.html

in Intellij IDEA. I believe this is the page being retrieved and served for the home page. The IDE led me through three lines it believes are incorrect.

  • The <head> section is not being closed properly due to a spurious </style> tag (at about line 242) before the </head> tag.

  • What appears to be a template place-holder, [%config%], at about line 54 is not enclosed in quotes. I assume that is the error since the template on line 36 does have quotes and is not flagged.

  • Near the end of the file the last piece of script before the closing </body> tag

        <script>
        $(document).ready (function () {
            startup ();
            });
        </script>
    

does not have the document argument enclosed in quotes. This is the line the browser was complaining about. Every other such statement in the html does have quotes surrounding the argument.

I made the suggested changes and saved a local copy. However, I apparently cannot understand how to construct a file URI

urlServerHomePageSource: "file:///home/david/projects/river5/misc/editedserverhomepage.html"

in feedtools.js to serve the edited html or I would have tested the changes myself.

The problem is real, if weird, but I don't know enough about Javascript or jQuery to know if the changes make any difference.

Figured out how to load an edited version of the homepage from a local file.

None of the above helped. In fact, adding quotes to "[%config%]" screwed some stuff up.

I'm sorry, I did not see this issue before.

The duplicate </style> tag is definitely a problem, which I just fixed.

At some point, this behavior has crept into the Windows version of Firefox too. It produces the same error about the jQuery shortcut ($) not being defined.

The site continues to render correctly on iOS, on Windows in the Opera browser, and Microsoft Edge. This is on Windows 10 Pro, 64-bit using River 0.50 (cloned from github and installed on an Ubuntu server today 6 June 2017).

Seems like a Firefox issue.

Forgot to mention that this is on Node 8.0.0 also installed on 6 June 2017.

Can you look in the JavaScript console in the browser and see if there are other errors that happen before the one you report.

The errors you're reporting indicate that the browser is failing to load jQuery. Maybe you have some kind of extension loaded that could be causing the problem?

I haven't hear this report from others, btw.

This started working about a week ago when Firefox updated. You're probably right about a plugin issue since a few of them were incompatible and were not activated in the new version of FF.

All seems good now. The developer console reports an inability to connect to a web socket although it is configured to do so. Still seems to work fine though.

I'm glad it's working. The websocket connection, if it were made, would give you realtime updates to the river. It might be a port-blocking thing. Anyway I'm closing this issue for now.