pressbooks / pressbooks-book-directory-fe

A Vue.js frontend for the Pressbooks Directory
0 stars 1 forks source link

Avoid redundant navigation to current location: "/?q= #163

Closed richard015ar closed 3 years ago

richard015ar commented 3 years ago

There is a regular error in Sentry: https://sentry.io/organizations/pressbooks/issues/2180854482/?project=5552706&query=is%3Aunresolved

I was able to replicate it. This happens when a normal search is performed through the search input and that search is repeated, just like: multiple-search

The error in the command line is:

vue-router.esm.js:2062 Uncaught (in promise) Error: Avoided redundant navigation to current location: "/?q=biology".
    at Jt (vue-router.esm.js:2062)
    at Qt (vue-router.esm.js:2035)
    at e.Xt.confirmTransition (vue-router.esm.js:2195)
    at e.Xt.transitionTo (vue-router.esm.js:2125)
    at e.replace (vue-router.esm.js:2504)
    at vue-router.esm.js:2926
    at new Promise (<anonymous>)
    at we.replace (vue-router.esm.js:2925)
    at o.search (Searchbox.vue:212)
    at submit (Searchbox.vue?2977:1)
    at ne (vue.runtime.esm.js:1854)
    at o.n (vue.runtime.esm.js:2179)
    at ne (vue.runtime.esm.js:1854)
    at o.Rn.t.$emit (vue.runtime.esm.js:3888)
    at submit (VForm.ts:134)
    at ne (vue.runtime.esm.js:1854)
    at HTMLFormElement.n (vue.runtime.esm.js:2179)
    at HTMLFormElement.Zi.a._wrapper (vue.runtime.esm.js:6917)
    at HTMLFormElement.r (helpers.js:72)

Seems to be an error in the routing, each time the search is performed there a redundant redirection using the same URL. Has been fixed for search, but not for filters.

To solve -- could check in the search/filter query before it executes to see whether there has been a change. If no, do nothing. If yes, execute new query.

SteelWagstaff commented 3 years ago

Has not occurred since early June. Appears fixed in current version of Directory.