SiteAPI.js erros. Page not loading with 'members' permission

Hi

I have an issue with one of sites I’m working with
https://www.nsaprospects.com/coach-profile

The page contains custom code, that’s why support refuses to help.
A week ago we had an issue that the page wasn’t loading with ‘paying members’ settings, now it’s not loading even with ‘members’ permission’ settings.

Console error is
‘Uncaught TypeError: Cannot read property ‘props’ of undefined’
error file is: SiteAPI.js
the function from file is:
getSiteData() {
return this._site.props.siteData;
},

I’m not sure what additional info I have to provide, cause can’t say that error is really caused by Wix Code part. The page is working now if the permission is ‘Everyone’ and is not loading at all if permission is ‘members only’.

What do you mean by “custom code”. Do you mean Wix Code? You might have some problems regarding how you are checking the user in your code.

Can you please provide me with a valid member login via private message? I can then test it out and see what’s happening.

Hello.

It’s been a while since I posted here and I still have no news (in private messages as well) regarding the bug.
I’m working on that site for the client and he is thinking about changing the host because of that bug. Please, reply with some results or let me know where should I get the help in that case.

Regards

Your checkProfile() routine apparently doesn’t do anything:

export function checkProfile(userId) {
  wixData.get("User", userId)
    .then((userItem) => {
      if (userItem === null) {
        $w('#box2').expand()
        $w('#box2').show()
      }
    })
    .catch((err) => {
      console.log('we get err')
      console.log(err)
      let errorMsg = err;
    });
    if ($w("#dataset1").getTotalCount() === 0) {
      $w('#box2').expand()
      $w('#box2').show()
    }
}

The wixData.get() gets the data for a user with userId, but then you don’t do anything with the results.

The dataset.getTotalCount() doesn’t do anything since you haven’t set the filter of the dataset.

The reply is not connected to my issue.

  1. checkProfile() function is run in onReady part and the issue is that the page is not load at all (check the screenshot, please)
  2. I have errors with SiteAPI.js file and as far as I understand it’s not something created by me and not the one that I create
  3. Even if that function do nothing, it shouldn’t cause any site errors, the max result is to show elements or not, oh, or put message in console.
  4. The pages or site shouldn’t be broken even if I put really bad things in my Wix Code part. I do not have access to the window. or document. parts of JS.

I’ve referred this to QA for evaluation.