Undefined members page

Hi everybody,

I have an issue where I link a button on submit to another page that’s members only I get “undefined” where “account” is supposed to be. The button sees “account” but when I click on it in the preview, it shows “undefined”. It does not work when published either. The members page will show if I use wix.locationto in the code section. Any help is appreciated.

Thank you.

Your issue is not a Wix Corvid issue as it is about a link through the editor itself and not through code, therefore you should be going through Wix Support directly.
https://support.wix.com/en/article/contacting-wix-support

You are using the Wix submit button.
https://support.wix.com/en/article/adding-a-submit-button-to-your-form
However, the answer should still relate to your issue.

Anyways, as for your issue, when you use the Wix Members app and create new pages within it or use the standard pages that already come with the Wix Members app of you add other Wix apps.

Also, note that all the Wix Members app pages will have the prefix of yourwebsite/account/page-url, which is the default setting for the Wix Members app, although you can change this through the Advanced URL Settings through the Wix Members app settings if you wanted to.

Then you should just be able to link directly to the the dropdown list that appears, with all your Wix Members app pages that are shown with the ending of (members) will be taken straight to the site member that is logged in own member page which will be unique to that site member only.

So, if you wanted My Account page from the Wix Members app, then you would simply choose My Account from the dropdown list and the user will be taken to the My Account page which will be for that logged in site member only.

Obviously, if it is not a logged in site member that is viewing the page and it is just a public user, then they will not have the permissions to view the page as they are not a site member etc.

You do not have to actually type in the link address yourself, you should just be able to choose the page from the list as shown above.

As you state, if you do it through code with Wix Location and the to function, then it would be as below.

export function myaccountbutton_onclick(event) {
wixLocation.to(`/account/my-account`); 
}

Thanks for the lengthy explanation. It’s strange to me. The submit button works and inserts the values into the database but will not continue on to /account/work-information but if I used code with Wix Location to /account/work-information it works. The URL seems correct. I will go through Wix Support. Thanks for your help and time.