Did you get errors on the live site?
Press (Ctrl + Shift + I) to open the Developers Tools on Chrome, and open the Console tab, and check for errors there.
Did you get errors on the live site?
Press (Ctrl + Shift + I) to open the Developers Tools on Chrome, and open the Console tab, and check for errors there.
I did but there is too much code in there and very hard to spot. I did find some errors. I copied them. Don’t think these are what I was looking for.
margin : 0;
padding : 0;
border : 0;
outline : 0;
vertical-align : baseline;
background : 0 0;
No not these, you need to look for the Console
Console? What is Console?
A section where errors are logged, just like the console in the editor, look for a tab on top of the dev tools called console and click on
I found it! But it is a bit too long to copy.
Wait, I have some bits that are read.
Unchecked runtime.lastError: The message port closed before a response was received.
Required skin wasn’t loaded yet wysiwyg.viewer.skins.area.DefaultAreaSkin
get @ skins.min.js:1
bolt-worker.js:18 Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.
api/wix-sm/v1/authorize/454b35e3-60f1-4d72-9b2f-62b16e3f2186/pages:1 Failed to load resource: the server responded with a status of 403 ()
The other bits where yellow.
Maybe I should copy all. The yellow bits explain the red errors I think. (it is long)
Unrecognized feature: ‘vr’.
contentscript.js:449 injection entry point. starting message loop with extension sandbox and waiting for settings…
VM7 forum:1 Unchecked runtime.lastError: The message port closed before a response was received.
VM7 forum:1 A cookie associated with a cross-site resource at http://www.wix.com/ was set without the SameSite
attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None
and Secure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at Chrome Platform Status and Chrome Platform Status.
2skinsMap.js:29 Required skin wasn’t loaded yet wysiwyg.viewer.skins.area.DefaultAreaSkin
get @ skins.min.js:1
bolt-worker.js:18 Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.
api/wix-sm/v1/authorize/454b35e3-60f1-4d72-9b2f-62b16e3f2186/pages:1 Failed to load resource: the server responded with a status of 403 ()
2react-dom.production.min.js:30 Unrecognized feature: ‘vr’.
Yc @ react-dom.production.min.js:30
contentscript.js:449 injection entry point. starting message loop with extension sandbox and waiting for settings…
VM7 forum:1 A cookie associated with a cross-site resource at http://pinterest.com/ was set without the SameSite
attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None
and Secure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at Chrome Platform Status and Chrome Platform Status.
contentscript.js:449 injection entry point. starting message loop with extension sandbox and waiting for settings…
console.js:35 Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.
console.js:35 Loading the code for the Upload page. To debug this code, open wtgki.js in Developer Tools.
console.js:35 pro-gallery-santa-wrapper gallery widget started to load
console.js:35 searching the database failed!
e. @ ua-parser.js:1
console.js:35
e. @ ua-parser.js:1
console.js:35 pro-gallery-santa-wrapper gallery widget loaded
DevTools failed to load SourceMap: Could not load content for https://arthurvalatin.wixsite.com/gavideos/wix-freemuim-css-entry.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-photo-sharing-client/dist/models.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-catalyst-platformized-http-client/dist/http-client.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-catalyst-platformized-http-client/dist/models.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-catalyst-platformized-http-client/dist/field-mapper.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-catalyst-platformized-http-client/dist/json-interop.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-catalyst-platformized-http-client/dist/convert-object-to-field-mask.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-photo-sharing-client/dist/photo-sharing-client.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/wix-photo-sharing-client/dist/service-clients.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for https://static.parastorage.com/services/wix-ui-santa/1.1200.0/wixcode/wixcode-components.bundle.min.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
I don’t think there is anything in there.
Should I send you a copy of the code I have on my website. Just incase I made a mistake in the code?
Sorry for the late reply, yeah sure, share it and I’ll check it.
But please paste it in a code block
Don’t worry.
I copied and pasted the code.
import wixUsers from 'wix-users';
import wixData from 'wix-data';
let user = wixUsers.currentUser;
$w.onReady(function () {
if (user.loggedIn) { getUserDetails() }
})
async function getUserDetails() {
return wixData.query('PrivateMembersData')
.eq('_id', user.id).find().then((result) => {
let item = result.items[0]
let email = item.mickname;
let name = item.loginEmail;
$w('#input2').value = name;
$w('#input3').value = email;
}).catch((err) => {
console.warn('searching the database failed!')
console.error(err);
})
}
Hello Arthur, you’re not assigning the variables the correct values
Name should equal to item.nickname, which is written incorrectly with M instead of N, which causes an error and prevents the code from running.
Email should equal to item.loginEmail
Correct them and see if it works
Still not working.
import wixUsers from 'wix-users';
import wixData from 'wix-data';
let user = wixUsers.currentUser;
$w.onReady(function () {
if (user.loggedIn) { getUserDetails() }
})
async function getUserDetails() {
return wixData.query('PrivateMembersData')
.eq('_id', user.id).find().then((result) => {
let item = result.items[0]
let email = item.nickname;
let name = item.loginEmail;
$w('#input2').value = name;
$w('#input3').value = email;
}).catch((err) => {
console.warn('searching the database failed!')
console.error(err);
})
What errors are you getting if any?
I didn’t get any errors in the code. But my email and name doesn’t show up on the live site. I have the form connected to the dataset.
Did you check the errors in the live site?
I didn’t find the message “Searching the database failed!” in the console. I did find something interesting that might be it.
{"message":"permission_denied, details: {\"RequiredRole\":\"Member\",\"GivenIds\":\"member -> 78165ffe-6860-446a-94d3-dbeb520bf9c1\"}","details":{"givenids":"member -> 78165ffe-6860-446a-94d3-dbeb520bf9c1","requiredrole":"Member","error":"permission_denied","category":"api_error"}
Hello Arthur,
I expected that to be the case, so I wrote a tutorial on how to fix this issue by bypassing the permissions.
You can find it here:
https://www.wix.com/corvid/forum/community-discussion/tutorial-collection-permissions-and-hooks-and-how-to-bypass-them
Check out the solution on my newest answer
Yes, I am looking at your article now.