top of page

Forum Posts

Krs Mis
Apr 02, 2019
In Coding with Velo
Does Anybody know is there any possibility to find user info in backend after update. WHen i i try import wixusers i get that its impossible in backend. I need to updeate all items after save in user email. I have may functions so its easier to do it in afterudate hook. Thanks for help
0
0
19
Krs Mis
Feb 07, 2019
In Coding with Velo
Hi I just write to ask experts if i have chosen best solution becasue i need to use variable in many function on pages and dont want to take each time i need 1. i need to use email to check who is logged in and then filter all pages by email. BEfore i did it by id of user but i realized that when i need to change some datas i can not put someone id. Its logical because i'm not owner. But some pages needs i also put some data but then there is my id. 2. so i will filter then by email and when insert data add email of user. Is it best way to use like global variable to use users email i create email variable ---> i make function to return email. --> after onready i start function . 3. then i can use email of user in all function on page without finding each time inside function. MY QUESTION is is it best way to do it or maybe session or backend . I'm asking becasue i will use user's email maaaaaaaaaaaaaany times and it should be stable and quick. code let user = wixUsers.currentUser; let userId = user.id; let isLoggedIn = user.loggedIn; // true let email function findemail(){ if (isLoggedIn) {user.getEmail() .then((email1) => { email = email1; // console.log(email); return email });} } $w.onReady(function () { findemail();
0
6
1k
Krs Mis
Feb 04, 2019
In Coding with Velo
Hi last months i was so happy work with wix and i think its great product. But last days was very strange. I had problem with error which i find out after few nights of work. At wix support they didnt answered me for few days and after lots of remainders they said that better i ask at wix code forum. So at wix forum nobody knows what is happening and its problem becasue if i have site i get money from , my clients would get crazy. Last night i started rebulding page after page to avid error. but its not solution. there is a bug and if anyone is intrested read exacly where. 1. one day my page started get like 100-200 errors at some pages(i didnt touch those pages). 2. after lot of time searching i found function disable() and enable() is responsible for it 3. suddenly some of elemnts on page that has id get " Cannot read property 'compId' of undefined. " and in live mode much more different 4. i can show at paga KARTOTEKA. If someone has access to my editor. Go there and switch on function "input 20" disable(). You will see error than. If You go to PRZEBIEG IMPREZY page You will see 200 errors becasue i didnt have time to check it. Switch off // function disableall() and enableall() and there is no errors :). At KARTOTEKA page its easy becasue only 2 elements make arrors so maybe some savy developers will find out whyonly those. 5. if someone is more intrested i can show exacly where, chat or by phone
Dissapointed with wix support "help" content media
0
10
142
Krs Mis
Jan 31, 2019
In Coding with Velo
WIX TEAM Please help because suddenly all ma pages get this error like crazy. Does anybody get this error as well?
TypeError: Cannot read property 'compId' of undefine content media
0
6
325
Krs Mis
Jan 31, 2019
In Coding with Velo
Does anybody have such error for last few days. I have pages which were not touched for weeks and last few days have such error. Especially in live mode.
0
7
257
Krs Mis
Jan 28, 2019
In Coding with Velo
Does Anyone knows what compId means. I dont have any elemtn with such Id. It is not connected with code but this error shows i preview. Any hint where should i look for source of this error?
0
14
1k
Krs Mis
Jan 20, 2019
In Coding with Velo
Is it possible to get items from reference item that has reference. I have collection x -> reference to colection y -> reference to collection z i need query collection x. When i use include i only see x ->y. Is it possible to see somehow in one result x-y-z.
0
3
38
Krs Mis
Jan 17, 2019
In Coding with Velo
Does anybody know where can i find what is error about console.js:35 Failed to load initial data Error: Unknown error, request ID: 1547725589.5865265265073107259 site www.ceglarnia.com when i enter "kartoteka" page i get this error in console
0
4
519
Krs Mis
Jan 12, 2019
In Coding with Velo
Hi I duplicated page stoly at my website. New pages are 2rzedy and 4 rzedy. www.ceglarnia.com At new pages at properties panel for any dropdown, button there is nothing inside. At "mother" page 'stoly' i have lots of function onclick and onmouse etc. All those function at new site are in code but i dont see them in properties panel. Pages works corretcly but i'm not sure now which functions are there and if everything is ok
0
4
82
Krs Mis
Jan 08, 2019
In Coding with Velo
i nned to change position of box after click of button. I can do it by duplicate and hide show. But it doesnt make sense becasue its the same element. Can i somehow change position of element?
1
10
2k
Krs Mis
Jan 04, 2019
In Coding with Velo
hi i have site and just discovered than only in mozilla is not working one script. Sourse map error i see in console. I have no idea what to do because in chrome and IE its ok. And dont understand what is it? SOmeone help??? Błąd mapy źródła: TypeError: NetworkError when attempting to fetch resource. URL zasobu: moz-extension://707077ba-4edc-4902-a8ee-f543dc396b15/mcafee_wa_content.js URL mapy źródła: ../sourceMap/firefox/mcafee_wa_content.map[Więcej informacji] Błąd mapy źródła: request failed with status 403 URL zasobu: https://static.parastorage.com/services/santa/1.5899.3/packages-bin/first-load/first-load.min.js URL mapy źródła: dataFixer.min.js.map[Więcej informacji]
0
6
475
Krs Mis
Jan 01, 2019
In Coding with Velo
I have repeater where are items which has reference to item with media gallery. In repeater i put slide media gallery from wix gallery. And by suprise in gallery there are already pictures from referenced item. but gallery iiself is not connected to dataset. IS it fucntion of repeater that is looking for media gallery and if there is one connect automaticly? Or its some miricle that without connecting gallery to dataset its connected. Im asking becsuse when internet is low its not connecting and i'm not sure if i sgould do something with it?
0
2
192
Krs Mis
Dec 28, 2018
In Coding with Velo
Hi i have preloader which is easy hide and show text in a box. My page have some data to read and it takes like 3-5 second. Whenever i put my function it shows when dates are on. But i want to see it on blank white page during everything is loading because people dont know what is going on. Is it possbile somehow to read this loader and then rest of page? function preloader() { $w('#preloader').show(); $w('#text816').hide('FadeOut'); $w('#text816').show(); $w('#text816').hide('FadeOut'); $w('#text816').show(); }
0
3
47
Krs Mis
Dec 22, 2018
In Coding with Velo
Hi Does anybody knows code for changing value of field in collection when other has changed. i stucked with updating value of "numer" in collection "zakwaterowanie" to collection "listagosci" pokoj. g2 is refernced with title of listagoscie therefore let gosc=item.g2. Console.log shows me good values but error shows " Hook afterUpdate for collection zakwaterowanie result ignored! Expected hook result to resolve to an object with an '_id' property, but got [Undefined] " thanks in advance export function zakwaterowanie_afterUpdate(item, context) { let gosc = item.g2 let id=gosc._id let pokoj = item.numer // console.log ("hoooookspokoj") // console.log(pokoj) // console.log(id) let toUpdate = { "_id": id, "pokoj": pokoj, }; wixData.update("listagosci", toUpdate) .then( () => { return item; })}
0
7
441
Krs Mis
Dec 11, 2018
In Coding with Velo
Hi i have question. When i want to save what i change in repeater my funcion seems to save and refresh only inside repeater. How can i change it to save whats in repeater but refresh whole dataset because its sorted. I want to refresh sorting after save. export function button71_click(event, $w) { return $w("#dataset1").save() .then(() => { // Data is saved now refresh the dataset1 $w("#dataset1").refresh(); }) .catch( (err) => { let errorMsg = err; console.log(errorMsg); }); }
0
15
3k
Krs Mis
Dec 11, 2018
In Coding with Velo
Hi does anybody can help me with one thing. I have query which gives me array. Shortly there are items (guests) that are not empty in field g1 or g2 or g3 or g4. Now i need to put into new array all guests. I meand one column "guest" with all guests (g1,g2,g3,g4) not entire items. I need this array to use in different code but i stuck in taking only those columns from collecion. function getOccupiedSeats () { return wixData.query("zakwaterowanie") .limit(200) .eq("_owner", userId) .isNotEmpty("_owner") .isNotEmpty("g1") .or(wixData.query("zakwaterowanie") .limit(200) .eq("_owner", userId) .isNotEmpty("_owner") .isNotEmpty("g2")) .or(wixData.query("zakwaterowanie") .limit(200) .eq("_owner", userId) .isNotEmpty("_owner") .isNotEmpty("g3")) .or(wixData.query("zakwaterowanie") .limit(200) .eq("_owner", userId) .isNotEmpty("_owner") .isNotEmpty("g4")) .find() .then((result) => { return Promise.resolve(result.items); } ) }
0
2
169
Krs Mis
Dec 07, 2018
In Coding with Velo
https://www.wix.com/code/home/forum/wix-tips-and-updates/example-checkbox-dropdown At example editor there is mistake somewhere. I suppose where but i cant find what should be there. Does anyone from Wix Team can check it. Thanks
0
9
30
Krs Mis
Dec 07, 2018
In Coding with Velo
Hi does anyone from wix team or code expert help me or at least tell whats wrong with my code. Shortly there is function getEmptyrooms that compares two queries and gives me not used items. It works because gives me results in console.log than i want to put results to dropdown with field "imie" from array because i want only not used records there to choose from dropdown. $w.onReady(function () { uniqueDropDown1(); }) function uniqueDropDown1 (){ getEmptyRooms() .then(results => { let options = [{"value": '', "label": 'All Continents'}]; options.push(...results.items.map(continent => { return {"_id": continent.imie, "label": continent.imie}; })); $w('#dropdown2').options = options; // let items = results.items // let titlesOnly = items.map(item => item.imie); // console.log(results); //console.log ("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"); // let uniqueTitles = getUniqueTitles(results.items); // $w("#dropdown2").options = buildOptions(uniqueTitles); //console.log(uniqueTitles) //console.log ("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr") }); function getEmptyRooms() { // Get list of occupied rooms (we return a Promise so that the calling function can // process the results return getOccupiedRooms() .then((occupiedRoomList) => { let emptyRoomQuery = wixData.query("listagosci"); // loop through occupied rooms creating a list of queries to exclude occupied rooms for (let i = 0 ; i < occupiedRoomList.length; i++) { // Get a record to exclude let occupiedRoomRecord = occupiedRoomList[i]; let exclusionQuery = wixData.query("listagosci") .eq("_id", occupiedRoomRecord.gosc); emptyRoomQuery = emptyRoomQuery.not(exclusionQuery); } // We have built our Empty Room Query - now execute it return emptyRoomQuery // .ascending("sortowanie") .find(); }) .then((results) => { console.log("ooooooooooooooooooooooooooooooooooooooooooo") console.log(results) return Promise.resolve(results.items); }); } let user = wixUsers.currentUser; let userId = user.id; function getOccupiedRooms() { return wixData.query("stoly") .eq("_owner", userId) .isNotEmpty("_owner") .isNotEmpty("gosc") .find() .then((result) => { console.log("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz") console.log(result) // Return a promise with the array of occupied rooms return Promise.resolve(result.items); } ) }
0
2
133
Krs Mis
Dec 06, 2018
In Coding with Velo
HI i stucked again with one problem. There is many dropdowns on forum but i need dropdown which takes values from query i made. I have reapetor with chairs and want to put names of people to this chairs and on change save it. But when i sit someone i dont want to see him again in dropdown. So i have query to give me not sitted persons. But query gives me many results with many columns. I would like only "imie" in dropdown. I will write when i manage to solve it entire code because i couldnt find code for such dropdown which gives me not unique values but not "used" values. I was trying to many codes from forum but alweys something was wrong. My funncion give such results getnotSitted() .then(results => { console.log(results); 0: "{\"_id\":\"743cc88e-0789-4eb9-91ea-52d1a32ac02e\",\"miejsce\":103,\"_owner\":\"5c4794ca-8ac7-4193-9e61-6bf81eb53307\",\"_createdDate\":\"2018-12-05T16:54:20.584Z\",\"_updatedDate\":\"2018-12-05T18:40:19.744Z\",\"imie\":\"aga zielska\"}" my code i tried is like here but nothing shows up in dropdown $w.onReady(function () { uniqueDropDown1(); }) function uniqueDropDown1 (){ getEmptyRooms() .then(results => { //console.log(results) //console.log ("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr") const uniqueTitles = getUniqueTitles(results.items); $w("#dropdown").options = buildOptions(uniqueTitles); }); function getUniqueTitles(items) { const titlesOnly = items.map(item => item.imie); return [...new Set(titlesOnly)]; } function buildOptions(uniqueList) { return uniqueList.map(curr => { return {label:curr, value:curr}; }); } }
0
2
54
Krs Mis
Dec 05, 2018
In Coding with Velo
Hi i have function and want it works 3 times after i click button. Unfortunatelly it works once or when i write without "then" 3 times but values dont change because funcion goes too quick. Does anybody can take a look. Thanks function dodajestol(){ $w("#dataset1").onReady( () => { let count = $w("#dataset1").getTotalCount(); $w("#dataset1").new() .then(() => { $w("#dataset1").setFieldValue("miejsce", count+101); return $w("#dataset1").save(); }) .then(() => { $w("#dataset1").refresh(); console.log("New item saved"); }) })} export function button64_click(event) { $w('#button64').disable() dodajestol() .then(() => { dodajestol() }) .then(() => { dodajestol() }) .then(() => { $w('#button64').enable(); }) }
0
2
45

Krs Mis

More actions
bottom of page