Closed dylanmcgowan closed 6 years ago
Hello @dylanmcgowan ,
Please update this issue with:
flow-router-extra
you're experiencing this issueMeteor
you're experiencing this issueAs I remember this was previously discussed, at the meteor's forum, right? Does that discussion got a conclusion?
I'm able only to reproduce it at Safari.
Hey @dr-dimitru nice seeing you here! Still no resolve over at the Meteor forums so I brought the issue over here. Weird how that only happens in Safari for you, every device & browser I've tested on has the same issue (Chrome, FF, Safari, and their mobile versions). Thanks for your quick response and fix though! I can't update the flow-router-extra
package yet, is there some timeline or thing that needs to happen for it to go live so i can test?
Heres a sample of how I render a template in all my views.. I'm using BlazeLayout - is that still the right move?
FlowRouter.route('/', {
action() {
BlazeLayout.render('appLayout', { main: 'Landing_page' });
},
name: 'home'
});
ostrio:flow-router-extra@3.4.0
I can't update the flow-router-extra package yet, is there some timeline or thing that needs to happen for it to go live so i can test?
Need to fix some other things today, should be published soon. Sorry for the delay.
I'm using BlazeLayout - is that still the right move?
Yes, you can still use the BlazeLayout, but recommended way is build-in .render()
method. Take a look on our Templating tutorials
Hello @dylanmcgowan ,
Published as v3.4.1
.
Thank you for contribution, hope this will fix your issue.
Feel free to reopen it in case if the issue still persists on your end.
Thanks so much for your time @dr-dimitru! Unfortunately the issue is still persisting so we may need to re open this.
I changed my routes to use the render()
method instead of BlazeLayout
and here's what that code looks like:
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import '../../../ui/layouts/app-layout.js';
import '../../../ui/pages/landing/landing-page.js';
FlowRouter.route('/', {
action() {
this.render('appLayout', 'Landing_page');
},
name: 'home'
});
The error isn't getting thrown to the console any more, but the same buggy behavior is occurring. If there's anything I can do to help let me know. Hope we can resolve this, you've been a massive help thus far!
@dylanmcgowan
The possible reasons for this behaviour:
path
(the first argument)a
elements with href
attribute).go()
method@dylanmcgowan any news on this one?
Hey @dr-dimitru, only bad news 😢
1.Each of my routes has a defined path.
2.The only routing package in my app is ostrio:flow-router-extra
FlowRouter.go('/url-path')
in all event mapsI also tried using the {{urlFor}}
helper instead of FlowRouter.go()
but the same browser history back bug occurs. I don't know what else to do.
Hello @dylanmcgowan ,
Try to change FlowRouter.go('/url-path')
to FlowRouter.go('routeName')
.
Hello @dylanmcgowan ,
Any news on this one?
@dylanmcgowan what do you use for analytics? okgrow:analytics
? See https://github.com/meteor/meteor/issues/9419#issuecomment-347274743
Wow that looks like the fix! Do you think they'll update their meteor package, or do i need to refactor my app to use the npm one?
@dylanmcgowan so you're using okgrow:analytics
??
If so, yes, you need to switch to NPM package, or wait for an update at Atmosphere.
Yes I am using that okgrow:analytics
package! Thank goodness I was loosing my mind over here. Thanks so much @dr-dimitru you've been such a massive help :)
Hey @dylanmcgowan , I'm glad to help :) This is the long one ))
This issue took time to poke around. Thanks to community, Open Source, and @derwaldgeist . Do you ever imagine how this could be solved under close environments. Damn! I love Open Source (IMHO it should be always be written starting with capital letters)!
Feel free to close it once you will successfully update package, and your issue will be gone.
Yeah, I absolutely love OpenSource. In the corporate world, you would wait for such an update for months. Thanks!
Hey guys, I think this is the right place to post this, please correct me if I'm wrong. I recently deployed a meteor project to this url
After loading the root url and programmatically routing to another path (with
FlowRouter.go
), then clicking the browser's back button this error pops up.Uncaught TypeError: Cannot read property 'replace' of undefined
I deployed the project with the --debug flag and the error occurs in the
_.each
block withpath.replace
on line 435..When the back button is clicked, the route path (in the url bar) changes to the correct path, but the corresponding template does not render.
This bug can be reproduced by going to this url, clicking "save me money", then clicking the browser back button.
On the shop insurance template there's an X with a click event including
FlowRouter.go('/')
Weirdly enough, after clicking that X when the error is thrown, the root url template loads and then the error won't happen again until you refresh the browser.Note: everything works as intended locally, this only happens in production
Any help would be much appreciated, and if you need any more details please let me know!
Thanks, Dylan