Closed Hassankhd closed 3 years ago
Hi Hassan, it's likely that you missing a ")"
in your script. The other errors belong to Jetpack.
Hi Dale,
I just fixed the issue as well as most of my errors, but I'm getting this error from the onauthstatechanged function:
Here I'm trying to get the uid of the currently signed in user to perform the vast majority of my firebase functions, but apparently the logged in user is always being undefined, although the sign up/log in process is working and user info is being stored in firebase successfully. Is there anything I'm supposed to add in the sign up/log in pages to guarantee that the onauthstatechanged functions in other pages fetch the logged in user? Please let me know what I can do in this case. Thanks in advance!
Can you add this one after the condition?
console.log(user)
Here's what I got:
I can see the user's uid here okay. Should I just write user.uid instead of user.user.uid? I used the latter because I saw something of the sort online as I was learning firebase functions.
@Hassankhd, sorry I was busy today. I guess you found the solution for it?
Hello Dale!
I remember you suggested that I use the Integrate Firebase Template plugin for my javascript files. I used the plugin to put most of my JavaScript files and tried to load my sign up page but it gave me a weird error in the console about some pre-existing plugins.
I contacted wordpress support and they told me the problem is with something related to the plugin and so I had to contact you about it. To help you understand where the issue may be coming from, I will show you one of my sign up files and how I'm adding all my files via wp_enqueue_script:
the class.if-template.php file is in the "public" folder not the "dashboard" folder. I mentioned this because perhaps it has to be elsewhere and I didn't know. If there's anything else you need to know about let me know. Thanks in advance!!
Best regards, Hassan