"Create account" link forces page reload with Iron Router

Clicking ‘Create Account’ or ‘Forgot Password’ in the standard accounts-ui modal causes the page to reload immediately after changing the button text to “Create account” from “Sign in”.

The page reloads, modal is gone: it’s impossible to create an account.

My app is using Iron Router with a route set up for ‘/’. All I’ve done to the app so far is some basic styling and set up the router.

I’m new to Meteor but not to Node, and I’ve spent a long time already trying to debug this behavior. The “Login with Google” links work as expected. I can’t find evidence of this being a known bug; hopefully I’m missing something obvious.

Grateful for any help you can provide!

Iron Router is not officially recommended any more. I’d move to FlowRouter at least as advised by the Meteor 1.2 guide: http://guide.meteor.com/routing.html

Sorry it doesn’t answer your immediate question but it sounds like you’re not too far along and can switch with minimal waste of time coding to a depreciated package.

1 Like

Thanks for your reply - yes I can switch to FlowRouter now, without feeling the need to throw my laptop at the wall.

I didn’t know Iron was deprecated - it looks way more professional than Flow.

After switching to FlowRouter (it took all of 20 minutes) I was still having the problem and now I feel stupid.

It was using ‘a href=""’ in my navbar, where the loginButtons were situated, instead of ‘a href="#"’.

I hope this forum post can save someone the time that I lost!

I still find it a bit odd that everything was fine before adding (either of) the routing packages - even if I changed nothing else in the code, just did “meteor add kadira:flow-router”.

2 Likes