Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click on submission results in error "Impossible to invoke a method ("id") on a null variable." #160

Closed
chromadesign opened this issue Oct 28, 2017 · 7 comments

Comments

@chromadesign
Copy link

My forms are working fine and emails are sent without a problem. But when I click on a submission in the backend I get a template error saying "Impossible to invoke a method ("id") on a null variable.", see screenshot below.
screenshot

@hubertprein
Copy link
Contributor

hubertprein commented Oct 30, 2017

Sounds like something else might be going wrong on your end, as I can't reproduce this. The only .id that is happening there, is on craft.users. Which should be working just fine, as craft.users can't be null.

@chromadesign
Copy link
Author

Interestingly enough, when moving the site to a different URL the problem solved itself! God knows why...

@hubertprein
Copy link
Contributor

That's weird indeed. Glad it got solved though!

If it happens again, reopen the issue and we'll see if we can reproduce it.

@akuales
Copy link

akuales commented Dec 14, 2017

I do have the same problem now after trying to post forms via ajax.
At some point I couldn't open any submission anymore from any other form I created.

@haabe
Copy link

haabe commented Dec 15, 2017

I experience this error as well, but not using Ajax.

I think it might be related to whether you are logged into Craft as a user or not when submitting the form.

@chasegiunta
Copy link

Also experiencing this problem.

@chasegiunta
Copy link

chasegiunta commented Feb 1, 2018

@hubertprein This stems from the version of Craft you have. craft.users will be null if you're on a Personal or Client license, as Craft doesn't allow users. Just to test, you can try to output any craft.users method in any twig template and it will break.

Upgrading to Craft Pro license fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants