Problems with useraccounts package

I’m upgrading to the “useraccounts” package (specifically useraccounts:bootstrap) and having some issues.

Following the instructions in the guide, it says the template “atForm” can be included anywhere - but for me it’s not working.

I currently have these packages added:

useraccounts:bootstrap
accounts-password
useraccounts:flow-routing

Any ideas as to why atForm isn’t even working? I see no additional steps in the guide that I missed, so I’m not sure what is going on

What problem are you seeing? Any errors or is nothing happening? Can you share some code showing how you have things configured? (like an example of your atForm template inclusion, etc.). If you meteor create a new sample project, just add the 3 packages you mentioned, and call {{> atForm}} in the default .html template created, it will work. You can always start from there adding your config/changes in slowly until you see it fail.

Did you remove accounts-ui?

I was following the Meteor guide, so my process was: I removed accounts-ui. I added the packages listed. Then attempted to use atForm in my template. It creates only an empty element.

Here is a code segment from my template:

        {{> partCategoryList}}

        {{> atForm}}

Here is a screenshot displaying the results:

Seems that the template is empty, CSS styles are showing up though? Any ideas?

Are you already logged in? If so try logging out first.

How could I log in? I do not even see the login buttons lol

You might have still logged in with Meteor.loginWithPassword directly, so I wanted to make sure (since if you were logged in you wouldn’t see the login form). So just to be sure - if you run Meteor.userId() from your browser console, you get null back?

Are you getting something like:

Exception in template helper: TypeError: Cannot read property ‘form’ of undefined
at AT.getState

…in the console? This exact thing (empty div) is happening to someone else with useraccounts:materialize. I’m trying to reproduce it, but can’t. In the other person’s case, they downloaded code from github and had a custom packages folder that might be causing the issue.

Ahh that makes sense. Yes, I do receive a userId. Are there any quick templates for logging out available?

Just call Meteor.logout() from your browser console.

1 Like