top of page

Forum Posts

trevor.wilson
Feb 05, 2021
In Coding with Velo
Steps to reproduce: Create two collections {A,B} Add a multireference field in A referencing B (I called mine CollectionB) B will automatically have a multireference field linking back to A (Called CollectionA) Delete B's multireference field to A Neither A nor B have a multireference field Add a multireference field in A referencing B using the same field name as in Step 2. B will not have a multireference field linking back to A (this is not expected). Add a multireference field in A referencing B using a different field name (I called mine NewCollectionB) Collection B automatically generates a multiference field, but this time it is called CollectionA-1. That suggests to me that field references (or at least back references) are not actually being deleted, they are just being hidden. I would like to delete my multi-references (or any arbitrary field) and know with certainty that the field has been obliterated from existence. I have an issue right now where I am unable to insert reference fields between two tables using wix-data and I am concerned that the linking between the tables has been corrupted due to deleting and recreating references as described above. I would like the freedom to create and delete references without corrupting my collections. When I delete something, I want it to be deleted.
0
12
115
trevor.wilson
Jan 25, 2021
In Coding with Velo
I would like to render pdfs that are stored in a document collection. I have installed pdfjs-dist and require. In the following example I make an attempt to call getDocument from the pdfjsLib with a base64 encoded pdf taken from this example. var pdflib = require('pdfjs-dist/build/pdf.js'); pdflib.GlobalWorkerOptions.workerSrc = "pdfjs-dist/build/pdf.worker.js"; var pdfData = atob( 'JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog' + 'IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv' + 'TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K' + 'Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg' + 'L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+' + 'PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u' + 'dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq' + 'Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU' + 'CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu' + 'ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g' + 'CjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAw' + 'MDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9v' + 'dCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G'); pdfjsLib.getDocument({data: pdfData}).promise.then(pdfDoc_ => { pdfDoc = pdfDoc_; console.log("inside getDocument", pdfDoc); }); Which results in the following error: Uncaught (in promise) Error: Setting up fake worker failed: "Cannot load script at: https://static.parastorage.com/services/wix-ui-santa/1.1515.0/assets/CustomElement/pdfjs-dist/build/pdf.worker.js". _setupFakeWorker pdf.js:3008 pdf.js:3008 I also tried to set the GlobalWorkerOptions.port: var pdflib = require('pdfjs-dist/build/pdf.js'); var pdfjsWorker = require('pdfjs-dist/build/pdf.worker.entry.js'); pdflib.GlobalWorkerOptions.workerPort = pdfjsWorker; var pdfData = atob( 'JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog' + 'IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv' + 'TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K' + 'Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg' + 'L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+' + 'PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u' + 'dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq' + 'Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU' + 'CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu' + 'ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g' + 'CjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAw' + 'MDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9v' + 'dCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G'); pdfjsLib.getDocument({data: pdfData}).promise.then(pdfDoc_ => { pdfDoc = pdfDoc_; console.log("inside getDocument", pdfDoc); }); Which resulted in: Uncaught TypeError: comObj.addEventListener is not a function MessageHandler pdf.js:6902 pdf.js:6902 Ideally I would import the pdfjs-dist/webpack module, but that depends on the worker-loader package which is not available in Velo. I am guessing that there is a way to load the pdfjs-dist though, since it was approved. My assumption is that someone tested it out.
0
3
357
trevor.wilson
Jan 06, 2021
In Coding with Velo
While creating a site member registration form with Velo, I somehow removed all my site member's login email from the dashboard Site Member list. If I view a site member and click Edit Contact, I can see that the login email is still recognized. Two of the site member's have neither a name field nor a login email. As a result, I cannot view their information. Even though I am an admin, I cannot delete the site members. I believe I use to be able to do this. The site member that is associated with my own account also has its login email blanked. My role as a site-member is Admin. How can I re-connect the site-member's login email fields? I am happy to do this programmatically if necessary, but I can't see a way to do this using the wix api.
0
8
81
trevor.wilson
Dec 13, 2020
In Coding with Velo
I am a software developer. I am not familiar with Wix. I would like to be able to write a Single Page Application using Angular or React with Express. Is there a way to write a portable web application that will run on a Wix host? Or must my web application use the Wix API?
0
2
33
trevor.wilson
Dec 13, 2020
In Coding with Velo
The article on working with npm packages provides instructions on how to install npm packages using the regular editor. How can I do the same when working on a Local Site Project? The Local Editor does not have the corvid side bar. Is it possible to install supported npm packages using the npm cli?
0
0
15

trevor.wilson

More actions
bottom of page