middlebury / coursecatalog

This Course-Catalog is a project to develop a web front-end for searching and browsing course information stored in Banner.
https://github.com/middlebury/coursecatalog/wiki
GNU General Public License v3.0
9 stars 2 forks source link

Saving Archive config has Javascript error in Firefox #24

Closed adamfranco closed 6 years ago

adamfranco commented 6 years ago

Saves works fine in Chrome, but are failing in Firefox. screen shot 2018-03-14 at 5 03 01 pm

I added a new courslist section to Arabic when I noticed this error.

cg923 commented 6 years ago

@adamfranco I'm not currently able to reproduce this issue in development or production. Is there anything else I should know?

adamfranco commented 6 years ago

I'm able to replicate it in development at http://hammer.middlebury.edu/~afranco/catalog/admin/export/1 by loading that URL, making no changes, entering a commit message, then clicking the upper save button.

Firefox 59.0

cg923 commented 6 years ago

Hmm. Still works fine for me? No output in the log, "Saved successfully," all good. Firefox 58.0.2 (Updating now, so I'll see if anything changes).

Still works in Firefox 59.0

adamfranco commented 6 years ago

This behavior is consistent in my browser in dev and production. Using the javascript debugger in FF, I was able to trace the issue to this line in saveJSON() screen shot 2018-03-15 at 1 55 35 pm

The last element that matches $('.group') is from a firefox extension I have install: https://addons.mozilla.org/en-US/firefox/addon/diigo-web-collector/ :-/

While the problem is with my browser extension injecting markup into the page, would it be reasonable to scope the search a bit more, such as using $('#sections-list .group') instead of just $('.group')?

cg923 commented 6 years ago

Ahh ok. Yes, that seems like an easy fix. I will check the rest of the JS file too and see if I can be more specific in other places to avoid similar conflicts in the future.