manuel-schoebel / ms-seo

A seo helper package for meteor.js
198 stars 55 forks source link

SEO incompatible with regular expression routes #84

Open jdmswong opened 8 years ago

jdmswong commented 8 years ago

Setting a regular expression path throws this error in console:

Exception from Tracker recompute function:
debug.js:41 Error: Cannot currently resolve a regular expression path
    at Url.resolve (url.js:317)
    at Handler.resolve (handler.js:108)
    at Function.Route.path (route.js:163)
    at Function.Route.url (route.js:171)
    at Function.Router.url (router.js:180)
    at Object.SEO.set (manuelschoebel_ms-seo.js:66)
    at Object.SEO.clearAll (manuelschoebel_ms-seo.js:154)
    at Object.SEO.set (manuelschoebel_ms-seo.js:62)
    at manuelschoebel_ms-seo.js:269
    at Tracker.Computation._compute (tracker.js:323)

Here is my route config:

Router.route(/.*/,{
  name: "home",
  template: "myTemplate"
});
jdmswong commented 8 years ago

removing the route name prevents the error but throws the warning:

You called Router.url for a route named undefined but that route doesn't seem to exist. Are you sure you created it?

This warning is caused by this package, and isn't generated when the package is removed.

So we have to choose between either naming our routes and throwing an error, or not naming them and throwing a warning. Any way to run this cleanly?

fvpDev commented 8 years ago

Any update on this issue?