From 02ede0bd4ce2a9f28d6b528ef07342c74205f98c Mon Sep 17 00:00:00 2001 From: idanlib-wix Date: Tue, 25 Jun 2024 15:14:27 +0300 Subject: [PATCH 1/3] add more velo error codes --- wix-data/wix-data/guides/Error Codes.md | 93 +++++++++++++++++-------- 1 file changed, 65 insertions(+), 28 deletions(-) diff --git a/wix-data/wix-data/guides/Error Codes.md b/wix-data/wix-data/guides/Error Codes.md index 8a976ca4ec..32e59b6e49 100644 --- a/wix-data/wix-data/guides/Error Codes.md +++ b/wix-data/wix-data/guides/Error Codes.md @@ -7,46 +7,80 @@ When you use the Wix Data API, you may encounter errors. This list includes the |WDE0001| Collection name must be a string.| Check that the collection name you provided is a valid string. | |WDE0002| Item ID must be a string.| Check that the item `_id` you provided is a valid string. | |WDE0003| Field name must be a string.| Check that the field name you provided is a valid string. | -|WDE0004| Failed to save {your item name} into {your collection name}. Items must be JavaScript objects.| Check that the item you're saving is a valid JavaScript object. | -|WDE0005| Failed to bulk save items into {your collection name}. Items must be an array of JavaScript objects and item IDs must be strings if present.| One or more of the items you tried to save was invalid. Check that the items are an array of valid JavaScript objects and that any `_id` properties in the items are strings. A valid ID key-value pair looks like this:
`'_id': 'ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb'`. | -|WDE0006| Failed to bulk save items into {your collection name}.Cannot insert more than 1000 items in one request.| You tried to save too many items at once. Avoid this error by splitting up your request into batches of fewer than 1000 items. | +|WDE0004| Failed to save {item name} into {collection name}. Items must be JavaScript objects.| Check that the item you're saving is a valid JavaScript object. | +|WDE0005| Failed to bulk save items into {collection name}. Items must be an array of JavaScript objects and item IDs must be strings if present.| One or more of the items you tried to save was invalid. Check that the items are an array of valid JavaScript objects and that any `_id` properties in the items are strings. A valid ID key-value pair looks like this:
`'_id': 'ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb'`. | +|WDE0006| Failed to bulk save items into {collection name}. Cannot insert more than 1000 items in one request.| You tried to save too many items at once. Avoid this error by splitting up your request into batches of fewer than 1000 items. | |WDE0007|Invalid update. Updated object must have an _id property that is a string.| Check that the object you passed for the `item` parameter has a property called `_id` whose value is a valid string.| |WDE0008|wixData.{the function you called} expects between {minimum} and {maximum} arguments, but was called with {the number of arguments you provided}.| The wrong number of arguments were passed to the function. Check your code to make sure that you are passing a valid number of arguments, and that you separate the argument values with commas.| |WDE0009| Document is too large.| The maximum size for a single collection item is 512 KB. Check that the items you're adding are smaller than this.| -|WDE0011| Invalid filter usage. .filter requires WixDataFilter.| Check that the argument passed to the WixDataAggregate [`filter()`](/wix-data/wixdataaggregate/filter) function is a valid [WixDataFilter](/wix-data/wixdatafilter) object. | +|WDE0011| Invalid filter usage. .filter requires WixDataFilter.| Check that the argument passed to the WixDataAggregate [`filter()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-aggregate/filter) function is a valid [WixDataFilter](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-filter/introduction) object. | |WDE0012| Invalid {function you called} usage. Filter is already set.| You are trying to use this function to set a filter, but you've already set one. You can only set one filter at a time. Check your code to see where the previous filter was set. | -|WDE0013| Invalid group usage. Group is already set.| You are trying to use the [`group()`](/wix-data/wixdataaggregate/group) function to set a group for your aggregation, but you've already set one. You can only set one group at a time. Check your code to see where the previous group was set. | +|WDE0013| Invalid group usage. Group is already set.| You are trying to use the [`group()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-aggregate/group) function to set a group for your aggregation, but you've already set one. You can only set one group at a time. Check your code to see where the previous group was set. | |WDE0014| Requests per minute quota exceeded.| Your site has exceeded the quota of the maximum number of data requests per minute. Learn more about [this quota](https://support.wix.com/en/article/velo-about-data-quotas#requests-per-minute) and how to prevent this error. | -|WDE0016| Filter must be an object.| Check that your filter is a valid WixDataFilter object. See the [API Reference](/wix-data/wixdatafilter/introduction) to learn how to build one. | -|WDE0018| Options must be an object with one or all of the following boolean properties: {expected properties for your function}|Check that the `options` object you provided for a function is valid.

For example, the [`save()`](/wix-data/save) function accepts 2 optional properties in its `options` parameter, `supressAuth`, and `supressHooks`. Defining an `options` parameter that has one of those properties whose value isn't a boolean results in an error.

To find the appropriate `options` properties for the function you're using, consult the API Reference. | -|WDE0019| Reference operation takes a string ID or an object with an ID to be connected.|Check that the argument passed to a function dealing with reference fields is either an item ID string or an object with an `_id` field. This error applies to the `referringItem` and `referencedItem` parameters of the [`isReferenced()`](/wix-data/isreferenced), [`replaceReferences()`](/wix-data/replacereferences), and [`removeReference()`](/wix-data/removereference) functions and the `item` parameter of [`queryReferenced()`](/wix-data/queryreferenced) function. | +|WDE0016| Filter must be an object.| Check that your filter is a valid WixDataFilter object. See the [API Reference](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-filter/introduction) to learn how to build one. | +|WDE0018| Options must be an object with one or all of the following boolean properties: {expected properties for your function}|Check that the `options` object you provided for a function is valid.

For example, the [`save()`](https://dev.wix.com/docs/velo/api-reference/wix-data/save) function accepts 2 optional properties in its `options` parameter, `supressAuth`, and `supressHooks`. Defining an `options` parameter that has one of those properties whose value isn't a boolean results in an error.

To find the appropriate `options` properties for the function you're using, consult the API Reference. | +|WDE0019| Reference operation takes a string ID or an object with an ID to be connected.|Check that the argument passed to a function dealing with reference fields is either an item ID string or an object with an `_id` field. This error applies to the `referringItem` and `referencedItem` parameters of the [`isReferenced()`](https://dev.wix.com/docs/velo/api-reference/wix-data/is-referenced), [`replaceReferences()`](https://dev.wix.com/docs/velo/api-reference/wix-data/replace-references), and [`removeReference()`](https://dev.wix.com/docs/velo/api-reference/wix-data/remove-reference) functions and the `item` parameter of [`queryReferenced()`](https://dev.wix.com/docs/velo/api-reference/wix-data/query-referenced) function. | |WDE0020| Provided relationship attribute {your field name} is not a multi-reference field.| Check that the collection field you're adding a multi-reference value to is a multi-reference type. | |WDE0021| Invalid reference| Check that the referring and referenced items you provided are valid. A valid referring item is either an `_id` string or an object with an `_id` property. A valid referenced item is either an `_id` string, an object with an `_id` property, or an array of `_id` strings. | -|WDE0022| Unable to execute a query. Only single multi-reference field can be included.| Your query includes more than the maximum of one multi-reference field. [Learn more](/wix-data/wixdataquery/include). | -|WDE0023| Cannot fetch more than 50 elements when include is being used on multi-reference field| Your query reached the limit of more than 50 referenced items. To retrieve more than 50 referenced items, use the [`queryReferenced()`](/wix-data/queryreferenced) function. Learn more about [querying items that reference other items](https://support.wix.com/en/article/including-referenced-data-when-filtering). | -|WDE0024| Field is deleted| The field you're trying to access was deleted. [Restore the field](https://support.wix.com/en/article/restoring-a-deleted-field-in-a-collection) in the Content Management System (CMS) before using it in your code. | +|WDE0022| Unable to execute a query. Only single multi-reference field can be included.| Your query includes more than the maximum of one multi-reference field. Learn more about [`include()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-query/include). | +|WDE0023| Cannot fetch more than 50 elements when include is being used on multi-reference field| Your query reached the limit of more than 50 referenced items. To retrieve more than 50 referenced items, use the [`queryReferenced()`](https://dev.wix.com/docs/velo/api-reference/wix-data/query-referenced) function. Learn more about [querying items that reference other items](https://support.wix.com/en/article/including-referenced-data-when-filtering). | +|WDE0024| Field is deleted| The field you're trying to access was deleted. [Restore the collection](https://support.wix.com/en/article/cms-formerly-content-manager-backing-up-your-collections) in the Content Management System (CMS) before using the field in your code. | |WDE0025| The {your collection name} collection does not exist. You cannot work with a collection using the Data API before it is created in the Editor.| Check that the collection you're trying to access exists on your site. | |WDE0026| The {your collection name} collection was removed, so you cannot work with it. To restore its data, create a new collection with the same name.| You're trying to access a deleted collection in your code. [Restore the collection](https://support.wix.com/en/article/content-manager-restoring-a-deleted-collection) by creating a new collection with the same name.| |WDE0027| The current user does not have permissions to {some action} on the {your collection name} collection.| A data request was made with insufficient permissions. [Set up your collections permissions](https://support.wix.com/en/article/velo-security-best-practices#collection-permissions) based on your site's needs. | |WDE0028| Operation time limit exceeded.| Your data request ran for more than 5 seconds and timed out. The request was terminated. If this error persists, it may be because your request is working with large amounts of data. Learn more about [this quota](https://support.wix.com/en/article/velo-about-data-quotas#individual-request-timeout) and how to prevent this error. | -|WDE0037| Invalid query on {your collection name}, invalid prev positioned query skip on a negative number.| Check that the skip value you provided for the query is 0 or greater. | -|WDE0044| Invalid {function name} parameter value. {function name} parameter must be a String.| Check that the parameter value indicated in the error message is a string.| +|WDE0032| Invalid {operator} parameter {operand}. {operator} parameter must be a {specifier} number. | The parameter to this function must be a valid number. | +|WDE0033| Invalid {operator} parameter {operand}. {operator} parameter must be a positive number. | When calling `limit()`, The parameter must be a positive number. | +|WDE0034| Invalid {operator} parameter {operand}. {operator} parameter must be a non-negative number. | When calling `skip()`, the parameter must be a non-negative number. | +|WDE0035| Invalid {operator} parameter {operand}. {operator} parameter must be an integer. | The parameter must be an integer. | +|WDE0036| Invalid {operator} parameter {operand}. {operator} parameter cannot exceed {value}. | The parameter cannot be larger than the specified value. | +|WDE0037| Invalid query on {collection name}. Invalid prev positioned query skip on a negative number.| Internal Wix Data error occurred. | +|WDE0038| Invalid {operator} usage. {operator} does not take parameters. | This function expects no parameters. | +|WDE0039| Invalid {operator} usage. {operator} requires one parameter. | This function expects exactly one parameter. | +|WDE0040| Invalid {operator} usage. {operator} requires two parameters. | This function expects exactly two parameters. | +|WDE0041| Invalid {operator} usage. {operator} requires three parameters. | This function expects exactly three parameters. | +|WDE0042| Invalid {operator} usage. {operator} requires at least two parameters. | This function expects at least two parameters, but fewer were provided. | +|WDE0043| Invalid {operator} usage. {operator} requires at least one parameter. | This function expects at least one parameter, but none were provided. | +|WDE0044| Invalid {function name} parameter value. {function name} parameter must be a string. | The parameter to this function must be a string. | +|WDE0045| Invalid {operator} parameter value {value}. Valid {operator} parameter types are string, Number or Date. | The parameter to this function must be a string, number, or date object. | +|WDE0046| Invalid {operator} parameter values {first} and {second}. Both parameters must be of the same type. | The parameters to this function must be of the same type. | +|WDE0047| Invalid {operator} usage. {operator} supports only number, string or date items. | The parameters to this function must be strings, numbers, or date objects. | +|WDE0048| Invalid {operator} field value {field}. {operator} field must be a string. | This field value must be a string. | +|WDE0049| Invalid {operator} parameter {obj}. {operator} expects {constructor name} only. | The parameter to this function must be a valid [Wix Data Query](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-query/introduction) object. | +|WDE0050| Invalid {operator} parameter query for {collection name}. {operator} accepts {constructor name} for the same collection only. | You can only chain functions that query the same collection. | +|WDE0051| Invalid {operator} parameters {effective arguments}. Valid {operator} values are string, array of strings, or varargs string. | This function expects a string, an array of strings, or multiple (varargs) strings separated by commas. For example: `("key1", "key2")`. | |WDE0052| The current site is in template mode. Please save it to modify data.| To modify collection data on a site created from a template, make sure to [save the site](https://support.wix.com/en/article/wix-editor-save-preview-and-publish-your-site#saving-your-site) first. | -|WDE0053| Internal wixData error: {error message}| An unexpected error occurred. If the error persists, please [contact support](https://www.wix.com/contact). | -|WDE0054| WD_UNKNOWN_ERROR | An internal server error. Please try running your code again. | -|WDE0068| Item IDs must be an array of strings| Check that the [`bulkRemove()`](/wix-data/bulkremove) function received an array of strings representing the IDs of the items you want to remove as its second argument.

Here is an example of a valid array: `['ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb', 'afthj8s4-dt7u-g4fr-at23-6joedh34awshy']`. | -|WDE0069| Failed to remove items from {your collection name}. Cannot remove more than 1000 items in one request| You tried to remove too many items from a collection at once. Avoid this error by splitting up your request into batches of 1000 items or fewer. To remove all the items in a collection, use [`truncate()`](/wix-data/truncate). | -|WDE0073| Item {requested item's ID} does not exist in collection {your collection name}.| Check that an item with the ID you're requesting exists in the collection you're querying. | -|WDE0074| WD_ITEM_ALREADY_EXISTS| An item with the requested ID value already exists. This error occurs when you try to insert an item into a collection with an `_id` value that already exists in that collection. If you are trying to either insert a new item or update it if it already exists, use [`save()`](/wix-data/save). | -|WDE0075| WD_BAD_REQUEST| This error occurs when you make an invalid request using the [`aggregate()`](/wix-data/aggregate) function. See the [API reference](/wix-data/wixdataaggregate) for details on building the WixDataAggregate objects used with this function.| +|WDE0053| Internal wixData error: {error message} | An unexpected error occurred. If the error persists, [contact support](https://www.wix.com/contact). | +|WDE0054| WD_UNKNOWN_ERROR | An internal server error. Try running your code again. | +|WDE0055| Failed to parse server response. | Wix Data could not parse the server response. Try querying again. | +|WDE0056| {operator} should be an Object. Got {value} instead. | The parameter to this function must be a valid object. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0057| {operator} should be an Array. Got {value} instead. | The parameter to this function must be a valid array. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0058| {operator} should be a Date, number, or string. Got {value} instead. | The parameter to this function must be a valid date object, a number, or a string. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0059| {operator} should be a string. Got {value} instead | The parameter to this function must be a valid string. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0060| {operator} array should only contain values of types date, number, and string. Got {value} instead. | The array can only contain dates objects, numbers, and strings. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0061| `{$in}` Array should have length 2, and match { String, Number }. Got {value} instead. | Invalid parameter types. Learn more about [data types in Wix Data](https://dev.wix.com/docs/velo/api-reference/wix-data/introduction#api-reference_wix-data_data-types). | +|WDE0062| `$matches` value {value} does not have property {property name} | The value specified in the `$matches` operator must contain the specified property. | +|WDE0063| `$matches.ignoreCase` should equal true. Got {value} instead | Wix Data error occurred. | +|WDE0064| `$matches.spec` array values should be either {{"type":"anyOf","value":" -"}} or {{"type":"literal","value":String}}. Got {value} instead | Wix Data error occurred. | +|WDE0065| Sort Model should be an Array. Got {value} instead. | Wix Data error occurred. | +|WDE0066| Sort Model Array should contain values of type Object only. Got {value} instead | Wix Data error encountered. Try modifying your query. If this error persists, contact support. | +|WDE0067| Sort Model Array items should have a single property with value "asc" or "desc". Got {value} instead | Wix Data error occurred. | +|WDE0068| Item IDs must be an array of strings. | Check that the [`bulkRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/bulk-remove) function received an array of strings representing the IDs of the items you want to remove as its second argument.

Here is an example of a valid array: `['ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb', 'afthj8s4-dt7u-g4fr-at23-6joedh34awshy']`. | +|WDE0069| Failed to remove items from {collection name}. Cannot remove more than 1000 items in one request. | You tried to remove too many items from a collection at once. Split your request into batches of 1000 items or fewer. To remove all the items in a collection, use [`truncate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/truncate). | +|WDE0070| {regex} keyword is not allowed. | Wix Data error occurred.Wix Data error occurred. | +|WDE0073| Item {item ID} does not exist in collection {collection name}.| Check that an item with the ID you're requesting exists in the collection you're querying. | +|WDE0074| WD_ITEM_ALREADY_EXISTS | An item with the requested ID value already exists. This error occurs when you try to insert an item into a collection with an `_id` value that already exists in that collection. If you are trying to either insert a new item or update it if it already exists, use [`save()`](https://dev.wix.com/docs/velo/api-reference/wix-data/save). | +|WDE0075| WD_BAD_REQUEST| This error occurs when you make an invalid request using the [`aggregate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/aggregate) function. See the [API reference](https://dev.wix.com/docs/velo/api-reference/wix-data/aggregate) for details on building the WixDataAggregate objects used with this function.| |WDE0076| Validation error. {error message from Wix app collection or external database}|A request to a [Wix app collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code) or an [external database](https://support.wix.com/en/article/velo-integrating-external-databases-with-your-wix-site) that you're working with returned with an error. Check that the data requests in your code are valid. | -|WDE0077| 'limit' cannot exceed {maximum query limit} |The query [limit](/wix-data/wixdataquery/limit) you provided is greater than the maximum supported by the collection. Provide a lower value. | -|WDE0078| Hook error.| The code for one of your [data hook](https://support.wix.com/en/article/velo-about-data-hooks) functions threw an error.

For example, consider an `afterInsert` data hook function in a `backend/data.js` file that includes this line of code: `throw new Error("sample error message")`

Once you define this hook, calling the [`insert()`](/wix-data/insert) function results in the `WDE0078` error. | -|WDE0079| {your collection name} is a single item collection and item must have id {expected ID}, but got {received ID} instead.| The item in a single item collection has a fixed `_id` value. Check that you aren't trying to change this value in your code. You can find the item's `_id` value using the [CMS](https://support.wix.com/en/article/about-the-content-manager-7160473#collections) or by using [`find()`](/wix-data/wixdataquery/find) without any filters. | -|WDE0080| {Multiple possible values.} | This error occurs when you make an API call with invalid arguments. For example, if you use the [`query()`](/wix-data/query) function without providing a collection name as an argument. To resolve this error, check the API reference to make sure you're providing the right arguments in your code. | +|WDE0077| 'limit' cannot exceed {maximum query limit} | The query [limit](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-query/limit) you provided is greater than the maximum supported by the collection. Provide a lower value. | +|WDE0078| Hook error.| The code for one of your [data hook](https://support.wix.com/en/article/velo-about-data-hooks) functions threw an error.

For example, consider an `afterInsert` data hook function in a `backend/data.js` file that includes this line of code: `throw new Error("sample error message")`

Once you define this hook, calling the [`insert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/insert) function results in the `WDE0078` error. | +|WDE0079| {your collection name} is a single item collection and item must have id {expected ID}, but got {received ID} instead.| The item in a single item collection has a fixed `_id` value. Check that you aren't trying to change this value in your code. You can find the item's `_id` value using the [CMS](https://support.wix.com/en/article/about-the-content-manager-7160473#collections) or by using [`find()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-query/find) without any filters. | +|WDE0080| { Multiple possible values.} | This error occurs when you make an API call with invalid arguments. For example, if you use the [`query()`](https://dev.wix.com/docs/velo/api-reference/wix-data/query) function without providing a collection name as an argument. To resolve this error, check the API reference to make sure you're providing the right arguments in your code. | |WDE0091| Database quota exceeded. Delete some data and try again.| Your site has exceeded the collection storage quota. Learn more about [this quota](https://support.wix.com/en/article/velo-about-data-quotas#collection-storage) and what you can do to resolve this issue. | |WDE0092| Dataset is too large to sort.| The data you tried to sort didn't fit into memory. This usually occurs when large items are being sorted or there are too many items being sorted to fit into memory at once. [Add an index](https://support.wix.com/en/article/content-manager-adding-an-index-for-your-collection) to your collection to avoid using up memory. | -|WDE0093| Invalid filter for _publishStatus field, only `.eq` and `.ne` filters are allowed with 'DRAFT' and 'PUBLISHED' possible values.| When you enable the [Draft and Publish Items](https://support.wix.com/en/article/content-manager-using-the-draft-publish-items-feature) feature for a collection, a `_publishStatus` field is added to every item in that collection. If you want to filter a data request based on this field, you can only use the [`eq()`](/wix-data/wixdatafilter/eq) and [`ne()`](/wix-data/wixdatafilter/ne) functions. The only valid values for `_publishedStatus` are `'DRAFT'` and `'PUBLISHED'`. Check that your code isn't using other filter functions or values with `_publishedStatus`. | +|WDE0093| Invalid filter for _publishStatus field, only `.eq` and `.ne` filters are allowed with 'DRAFT' and 'PUBLISHED' possible values.| When you enable the [Draft and Publish Items](https://support.wix.com/en/article/content-manager-using-the-draft-publish-items-feature) feature for a collection, a `_publishStatus` field is added to every item in that collection. If you want to filter a data request based on this field, you can only use the [`eq()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-filter/eq) and [`ne()`](https://dev.wix.com/docs/velo/api-reference/wix-data/wix-data-filter/ne) functions. The only valid values for `_publishedStatus` are `'DRAFT'` and `'PUBLISHED'`. Check that your code isn't using other filter functions or values with `_publishedStatus`. | +|WDE0094| Invalid {operator} parameter. {operator} parameter must be non-empty string. | The parameter to this function must be a non-empty string. | +|WDE0109| Payload is too large. | The request is too big. Consider restructuring your data. If you are attempting to store a media file, consider using the [Wix Media](https://dev.wix.com/docs/velo/api-reference/wix-media-v2/files/introduction) API. | |WDE0110| WD_BAD_REQUEST. | System error. Please try running your code again. | |WDE0111| GridAppId must be provided in SANDBOX segment | To resolve this error, reload your site in the browser. | |WDE0115| WD_UNKNOWN_ERROR| Your external database requested an unsupported data operation. | @@ -59,21 +93,24 @@ When you use the Wix Data API, you may encounter errors. This list includes the |WDE0128 | WD_UNKNOWN_ERROR | Your [external database adaptor](https://support.wix.com/en/article/velo-integrating-external-databases-with-your-wix-site) tried to create a collection item with no `_id` field. Check that any item created by an external adaptor contains this field. | |WDE0133 | Document field is too large to index, exceeds 1024 bytes. | This error occurs when you try to add a value to an indexed field that, together with other indexed fields, becomes too large. The total size of all indexed field values per item must be 1024 bytes or less. Learn more about [working with indexes](https://support.wix.com/en/article/velo-indexes-and-wix-data-collections) in your collections. | | WDE0134 | Field names with dollar ($) prefix are not allowed. | This error occurs when you try to add a field to a collection with a `$` at the beginning of its name. To resolve this error, remove the `$` from the name. | +| WDE0144 | Issue with processing data. | You don't have permission to perform this action. Ask the collection administrator for sufficient permissions. | | WDE0149 | Internal application error. | This error occurs when a Wix app collection fails with a system or unrecognized error. To resolve the error, retry the request. If the request fails, contact support. | | WDE0150 | Data hook syntax error. | This error occurs when your **data.js** file, or any other file it imports from, contains a JavaScript syntax error. To resolve this error, fix syntax errors in the JavaScript codebase. | -| WDE0151 | Incorrect cursor provided. | Pagination error occurred: the query's {cursor paging} property contains an invalid cursor. Check that the cursor identifier is correct. | -| WDE0152 | Cursor is expired. | Pagination error occurred: the query's {cursor paging} property contains an expired cursor. Query the collection again to create a new cursor. | +| WDE0151 | Incorrect cursor provided. | Pagination error occurred: the query's cursor paging property contains an invalid cursor. Query the collection again to create a new cursor. | +| WDE0152 | Cursor is expired. | Pagination error occurred: the query's cursor paging property contains an expired cursor. Query the collection again to create a new cursor. | | WDE0153| Reference {property in referencing collection} from {referencing item id} to {referenced item id} does not exist. | You are attempting to remove a multi-reference that does not exist. Check that the reference is correct. | | WDE0154 | The data collection share policy with ID {id} was not found. | A data sharing error occurred. Learn more about [sharing collections across sites](https://support.wix.com/en/article/wix-enterprise-sharing-cms-collections-with-sites-and-templates).| | WDE0155 | Data collection is already shared. | The specified data collection is already shared with this site. Learn more about [sharing collections across sites](https://support.wix.com/en/article/wix-enterprise-sharing-cms-collections-with-sites-and-templates). | | WDE0156 | Data collection {collection name} is not shared. | The specified collection is not shared with this site. Learn more about [sharing collections across sites](https://support.wix.com/en/article/wix-enterprise-sharing-cms-collections-with-sites-and-templates). | | WDE0157 | Field {property name} cannot be translated as {field type} data type is not translatable. | This field cannot be translated because its type is not supported by Wix Multilingual. For example, field types such as **Video** and **Number** cannot be marked as translatable. Learn more about [how Wix Multilingual works with the CMS](https://support.wix.com/article/wix-multilingual-translating-cms-collection-content#how-wix-multilingual-works-with-the-cms).| | WDE0158 | Multilingual plugin must have at least one translatable field. | To enable Wix Multilingual, mark at least one field as translatable. Learn more about [translation eligibility requirements for collections](https://support.wix.com/article/wix-multilingual-translating-cms-collection-content#translation-eligibility-requirements-for-collections). | +| WDE0159| Invalid query on {collection name}. There is no prev page. | You are viewing the first page of results and cannot call `prev()`. If necessary, try running a different query. | | WDE0160| Index already exists as a system index. | The field you are attempting to index is a [system field](https://support.wix.com/article/cms-formerly-content-manager-about-your-collection-fields#system-fields) for which Wix Data already has an index. | | WDE0161 | Data collection {collection name} is not multilingual. | You are querying translated content, but the collection is not translatable. Add this collection to Wix Multilingual, or select a translatable collection. Learn more about [translating CMS collection content](https://support.wix.com/article/wix-multilingual-translating-cms-collection-content).| | WDE0162 | Language {language} is not enabled for data collection {collection name}. | The requested language is not available for this collection. Enable this language in Wix Multilingual. Learn more about [managing languages in a multilingual site](https://support.wix.com/article/wix-multilingual-managing-languages-in-a-multilingual-site). | | WDE0163 | Invalid value for the page link {field name}: {cause for error}. | The value of this [Page Link field](https://support.wix.com/article/cms-formerly-content-manager-about-your-collection-fields#page-link-fields) does not conform to the dynamic URL slug structure. Learn more about [URL slug structures](https://support.wix.com/en/article/cms-creating-unique-dynamic-page-urls#about-url-slugs-and-url-slug-structures). | -| WDE0164 | The index {indexName} with the same fields already exists in collection {collection id}. | An index already exists in this collection for the same fields. To create another index, select [different fields](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/indexes-and-wix-data-collections#which-fields-make-good-indexes). | +| WDE0164 | The index {index name} with the same fields already exists in collection {collection id}. | An index already exists in this collection for the same fields. To create another index, select [different fields](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/indexes-and-wix-data-collections#which-fields-make-good-indexes). | +| WDE0165 | Invalid query on {collection name}. There is no next page. | You are viewing the last page of results and cannot call `next()`. If necessary, try running a different query. | | WDE0167 | Aggregation item field name cannot end with `.` | Cannot apply aggregation to a field that ends with a dot character `.`. Change the field name or select another field to aggregate. | | WDE0168 | Document nesting level is too deep | A data item can contain up to 50 levels of nesting. Restructure the item to contain 50 nested levels or less. | | WDE0169 | Filter nesting level is too deep | A filter can contain up to 50 levels of nesting. Restructure your filter to contain 50 nested levels or less. | From 3a3d2eba7b99fae916dcd4c2eabeff63fa9adc62 Mon Sep 17 00:00:00 2001 From: ievakr Date: Wed, 26 Jun 2024 12:15:09 +0300 Subject: [PATCH 2/3] DocWorks for editor-elements - 1 change detected, but 124 issue detected changes: Service $w.WixFormsV2 has changed description issues: Mixin $w.HiddenCollapsedMixin not found (Breadcrumbs.js (1)) Mixin $w.ViewportMixin not found (Breadcrumbs.js (1)) Mixin $w.Element not found (CollapsibleTextBox.js (1)) Mixin $w.HiddenCollapsedMixin not found (CollapsibleTextBox.js (1)) Mixin $w.ClickableMixin not found (CollapsibleTextBox.js (1)) Property link has an unknown type null (DashboardButton.js (110)) Property target has an unknown type null (DashboardButton.js (116)) Property prefix has an unknown type null (DashboardButton.js (146)) Property suffix has an unknown type null (DashboardButton.js (177)) Property customClassList has an unknown type $w.CustomClassList (DashboardButton.js (205)) Property link has mismatching types for get (string) and set (string,null) (DashboardButton.js (65, 110)) Property target is defined two or more times (DashboardButton.js (116, 140)) Property prefix has mismatching types for get (string,null) and set (string) (DashboardButton.js (146, 171)) Property suffix has mismatching types for get (string,null) and set (string) (DashboardButton.js (177, 199)) Mixin $w.ClickableMixin not found (DashboardButton.js (1)) Mixin $w.DisabledMixin not found (DashboardButton.js (1)) Mixin $w.HiddenCollapsedElement not found (DashboardButton.js (1)) Property customClassList has an unknown type $w.CustomClassList (DashboardHeading.js (33)) Mixin $w.HiddenCollapsedElement not found (DashboardHeading.js (1)) Property target has an unknown type null (DashboardIconButton.js (122)) Property customClassList has an unknown type $w.CustomClassList (DashboardIconButton.js (152)) Property target has mismatching types for get (string,null) and set (string) (DashboardIconButton.js (122, 146)) Mixin $w.HiddenCollapsedElement not found (DashboardIconButton.js (1)) Mixin $w.ClickableMixin not found (DashboardIconButton.js (1)) Mixin $w.DisabledMixin not found (DashboardI ... --- editor-elements/$w/WixFormsV2.service.json | 78 ++++++++++------------ 1 file changed, 35 insertions(+), 43 deletions(-) diff --git a/editor-elements/$w/WixFormsV2.service.json b/editor-elements/$w/WixFormsV2.service.json index 2b82516c43..fd26a4b0c7 100644 --- a/editor-elements/$w/WixFormsV2.service.json +++ b/editor-elements/$w/WixFormsV2.service.json @@ -48,17 +48,20 @@ "", "Note the following when working with the `WixFormsV2` element:", "", - "* The ID number that is shown when you hover over the form is actually a widget ID. You can change the widget ID in the Properties & Events tab. Example of a widget ID: `#371Ee199389C4A93849Ee35B8A15B7Ca2`. ", + "* The ID that is shown when you hover over the form is actually an element ID. You can change the ID at any time using the Properties & Events panel. Example of a default element ID: `#form1`. ", + "", + "> **Note:** ", + "> Before a certain date, the element ID was a long string such as `#371Ee199389C4A93849Ee35B8A15B7Ca2`. Now, that element ID is like `#form1`.", "", "* To get the form ID, call [`querySubmissionsByNamespace()`](https://www.wix.com/velo/reference/wix-forms-v2/submissions/querysubmissionsbynamespace). Example of a form ID: `21bcb6c7-02b3-4ed1-b6db-7856094fac03`.", "", - "* If you have several widgets with the same form (for example, you copy-pasted a form on the same site), the functions applied to a form ID will run on all widgets.", + "* If you have several elements based on the same form (for example, you copy-pasted a form on the same site), the functions applied to a form ID will run on all elements.", "", "* You can only use the default field name keys in the Velo code. To check the key name, click on the form field in the form edit mode and then the **Advanced** tab.", "", "* You need at least a [Standard Premium](https://support.wix.com/en/article/choosing-a-premium-plan) plan to be able to upload files in your form. Also, different premium plans allow you to have different quantity of fields, rules, and pages you can add.", "", - "* You can see the submissions both in the form dashboard and Wix Forms collection. The collection is read-only. You can manage submissions only in the form dashboard.", + "* You can see the submissions both in the form dashboard and Wix Forms collection. The collection is read-only. You can manage submissions only in the **Forms & Submissions** dashboard page under **Customer & Leads** in the menu.", "", "", "### Event Handling", @@ -90,14 +93,13 @@ "properties": [], "operations": [ { "name": "getFieldValues", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [], "ret": { "type": "$w.WixFormsV2.FormValues" }, "locations": - [ { "lineno": 95, + [ { "lineno": 98, "filename": "WixForms.js" } ], "docs": { "summary": "Gets Wix Form field values.", @@ -123,14 +125,13 @@ "extra": { } }, { "name": "getStepCount", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [], "ret": { "type": "number" }, "locations": - [ { "lineno": 170, + [ { "lineno": 173, "filename": "WixForms.js" } ], "docs": { "summary": "Gets the total number of steps in a Wix Form.", @@ -146,14 +147,13 @@ "extra": { } }, { "name": "getStepNumber", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [], "ret": { "type": "number" }, "locations": - [ { "lineno": 178, + [ { "lineno": 181, "filename": "WixForms.js" } ], "docs": { "summary": "Gets the current step number of a Wix Form. Counting starts from 1.", @@ -169,8 +169,7 @@ "extra": { } }, { "name": "navigateToStep", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "stepNumber", @@ -179,7 +178,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 186, + [ { "lineno": 189, "filename": "WixForms.js" } ], "docs": { "summary": "Navigates to the given Wix Form step. If an invalid number is passed, `navigateToStep()` doesn't run.", @@ -195,8 +194,7 @@ "extra": { } }, { "name": "onFieldValueChange", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "callback", @@ -205,7 +203,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 103, + [ { "lineno": 106, "filename": "WixForms.js" } ], "docs": { "summary": "Runs a callback when a site visitor changes Wix Form field values.", @@ -232,8 +230,7 @@ "extra": { } }, { "name": "onStepNumberChange", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "callback", @@ -242,7 +239,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 195, + [ { "lineno": 198, "filename": "WixForms.js" } ], "docs": { "summary": "Runs a callback when a Wix Form navigates to another step.", @@ -275,8 +272,7 @@ "extra": { } }, { "name": "onSubmit", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "callback", @@ -285,7 +281,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 112, + [ { "lineno": 115, "filename": "WixForms.js" } ], "docs": { "summary": "Runs a callback when a site visitor starts to submit a Wix Form yet before the form is actually submitted and sent to the server.", @@ -314,8 +310,7 @@ "extra": { } }, { "name": "onSubmitFailure", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "callback", @@ -324,7 +319,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 130, + [ { "lineno": 133, "filename": "WixForms.js" } ], "docs": { "summary": "Runs a callback when a site visitor is not able to successfully submit a Wix Form to the server.", @@ -358,8 +353,7 @@ "extra": { } }, { "name": "onSubmitSuccess", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "callback", @@ -368,7 +362,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 121, + [ { "lineno": 124, "filename": "WixForms.js" } ], "docs": { "summary": "Runs a callback when a site visitor submits a Wix Form and it is successfully received by the server.", @@ -386,8 +380,7 @@ "extra": { } }, { "name": "setFieldValues", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "values", @@ -396,7 +389,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 85, + [ { "lineno": 88, "filename": "WixForms.js" } ], "docs": { "summary": "Sets Wix Form field values. \nSetting the invalid field values fires the `onFieldValuesChange()` callback. The callback returns fields with the valid values previously set.", @@ -414,8 +407,7 @@ "extra": { } }, { "name": "submit", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [], "ret": @@ -425,7 +417,7 @@ [ "$w.WixFormsV2.FormValues" ] }, "doc": "Fulfilled - When submission is successful.\nRejected - Error message." }, "locations": - [ { "lineno": 148, + [ { "lineno": 151, "filename": "WixForms.js" } ], "docs": { "summary": "Submits a Wix Form.", @@ -481,7 +473,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 205, + [ { "lineno": 208, "filename": "WixForms.js" } ], "docs": { "summary": "A callback for a form field value change.", @@ -501,7 +493,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 236, + [ { "lineno": 239, "filename": "WixForms.js" } ], "docs": { "summary": "A callback for a changed form step number.", @@ -521,7 +513,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 213, + [ { "lineno": 216, "filename": "WixForms.js" } ], "docs": { "summary": "A callback for a form submission.", @@ -541,7 +533,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 228, + [ { "lineno": 231, "filename": "WixForms.js" } ], "docs": { "summary": "A callback for a failed form submission.", @@ -558,7 +550,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 221, + [ { "lineno": 224, "filename": "WixForms.js" } ], "docs": { "summary": "A callback for a successful form submission.", @@ -571,7 +563,7 @@ "messages": [ { "name": "FormValues", "locations": - [ { "lineno": 244, + [ { "lineno": 247, "filename": "WixForms.js" } ], "docs": { "summary": "An object containing information about an input field in a form.", @@ -588,7 +580,7 @@ "labels": [] }, { "name": "SubmissionError", "locations": - [ { "lineno": 250, + [ { "lineno": 253, "filename": "WixForms.js" } ], "docs": { "summary": "An object containing information about the error.", From 9802e3c085bac09d22483820409c62a9814d6fca Mon Sep 17 00:00:00 2001 From: joshua-sc <77091424+joshua-sc@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:30:46 +0300 Subject: [PATCH 3/3] wix-dashboard-addSitePlugin (#3008) * DocWorks for wix-dashboard - 4 changes detected changes: Service wix-dashboard has changed description Service wix-dashboard has a new operation addSitePlugin Service wix-dashboard has a new message AddSitePluginOptions Service wix-dashboard has a new message PluginPlacement * DocWorks for wix-dashboard - 1 change detected changes: Service wix-dashboard operation addSitePlugin has changed param pluginId doc * DocWorks for wix-dashboard - 1 change detected changes: Service wix-dashboard operation addSitePlugin.examples[0] has changed body * DocWorks for wix-dashboard - 1 change detected changes: Service wix-dashboard has changed description * DocWorks for wix-dashboard - 1 change detected changes: Service wix-dashboard operation addSitePlugin has changed summary --------- Co-authored-by: joshua-sc Co-authored-by: Wix Docs Feds Co-authored-by: adamfri <89579857+adamfri@users.noreply.github.com> --- wix-dashboard/wix-dashboard.service.json | 94 +++++++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/wix-dashboard/wix-dashboard.service.json b/wix-dashboard/wix-dashboard.service.json index 5f0ecf5a24..c212e369bf 100644 --- a/wix-dashboard/wix-dashboard.service.json +++ b/wix-dashboard/wix-dashboard.service.json @@ -51,7 +51,57 @@ { } }, "properties": [], "operations": - [ { "name": "closeModal", + [ { "name": "addSitePlugin", + "labels": + [ "changed" ], + "nameParams": [], + "params": + [ { "name": "pluginId", + "type": "string", + "doc": "ID of the site plugin, which you can find in your app's site plugin extension in the Wix Dev Center." }, + { "name": "options", + "type": "wix-dashboard.AddSitePluginOptions", + "doc": "Options to use when adding a site plugin." } ], + "ret": + { "type": + { "name": "Promise", + "typeParams": + [ "void" ] }, + "doc": "Fulfilled - when the plugin is added to the site." }, + "locations": + [ { "lineno": 1, + "filename": "sitePlugins.js" } ], + "docs": + { "summary": "
\n\n__Important:__\n\nThis API is in [Developer Preview](https://www.wix.com/velo/reference/api-overview/developer-preview) and is subject to change. \n\n
\n\nAdds a site plugin to a slot within an app created by Wix.", + "description": + [ "> This function can only be used in page code files for dashboard pages created in the [Wix editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages).", + "", + "The `addSitePlugin()` function returns a Promise that resolves when the plugin is added to the site.", + "", + "> **Note:** To use this function, Your app must have a site plugin extension. Learn more about [site plugins](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/site-plugins/about-site-plugin-extensions)." ], + "links": [], + "examples": + [ { "title": "Add a site plugin", + "body": + [ "import { addSitePlugin } from 'wix-dashboard';", + "", + "// ...", + "", + "const pluginId = '975bffb7-3c04-42cc-9840-3d48c24e73d5';", + "const pluginPlacement = {", + " appDefinitionId: '13d21c63-b5ec-5912-8397-c3a5ddb27a97',", + " widgetId: 'a91a0543-d4bd-4e6b-b315-9410aa27bcde',", + " slotId: 'slot1',", + "};", + "", + "addSitePlugin(pluginId, { placement: pluginPlacement });" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "closeModal", "labels": [], "nameParams": [], "params": @@ -558,7 +608,24 @@ "extra": { } } ], "messages": - [ { "name": "Archive", + [ { "name": "AddSitePluginOptions", + "locations": + [ { "lineno": 30, + "filename": "sitePlugins.js" } ], + "docs": + { "summary": "An object representing the options to use when adding a site plugin.", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "placement", + "type": "wix-dashboard.PluginPlacement", + "doc": "Information about the slot in which you want to add the plugin. Learn more about the [slots that are available on Wix app pages](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/site-plugins/supported-wix-app-pages/about-slots)." } ], + "extra": + { }, + "labels": [] }, + { "name": "Archive", "locations": [ { "lineno": 90, "filename": "openMediaManager.js" } ], @@ -991,6 +1058,29 @@ "extra": { }, "labels": [] }, + { "name": "PluginPlacement", + "locations": + [ { "lineno": 37, + "filename": "sitePlugins.js" } ], + "docs": + { "summary": "An object representing a slot in which to add a plugin.", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "appDefinitionId", + "type": "string", + "doc": "ID of the Wix app." }, + { "name": "widgetId", + "type": "string", + "doc": "ID of the host widget." }, + { "name": "slotId", + "type": "string", + "doc": "ID of the slot." } ], + "extra": + { }, + "labels": [] }, { "name": "Serializable", "locations": [ { "lineno": 39,