Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 on Services/Scenarios/{scenario.uuid}/forms when multi-values field is present #78

Open
Rvaucher opened this issue May 29, 2019 · 4 comments

Comments

@Rvaucher
Copy link

Rvaucher commented May 29, 2019

When trying to fetch (GET {{services}}/scenarios/{scenarion.uuid}/forms) the start-up form on a scenario, if a multi-value selection component is in it
component.txt, its default value is an empty array.

Due to this, while trying to fetch the form, I obtained this response
response.txt

If we switch back the default value to an empty string, we can get the form back.

@StephenOTT
Copy link
Member

Thanks for reporting. Great find

@devcitopia-zz
Copy link

This issue blocks us on creating forms even basic ones. Can you confirm that this issue will be fixed on the next release (scheduled in mid July AFAIK) ?

Thanks for your confirmation.

@StephenOTT
Copy link
Member

Yes we will look to get this adjusted as part of that release

@dcoevoet51
Copy link

dcoevoet51 commented Jul 18, 2019

Hello,

Here's an example of an error when I want to access a scenario's form with an multivalue upload component.

form content:

{
	"components": [{
		"label": "Upload",
		"mask": false,
		"tableView": true,
		"alwaysEnabled": false,
		"type": "file",
		"input": true,
		"key": "upload",
		"defaultValue": [],
		"validate": {
			"customMessage": "",
			"json": ""
		},
		"conditional": {
			"show": "",
			"when": "",
			"json": ""
		},
		"storage": "base64",
		"dir": "",
		"fileNameTemplate": "",
		"webcam": false,
		"fileTypes": [{
			"label": "",
			"value": ""
		}],
		"encrypted": false,
		"properties": [],
		"customConditional": "",
		"logic": [],
		"reorder": false,
		"url": "",
		"options": "",
		"webcamSize": ""
	}, {
		"allowCalculateOverride": false,
		"autofocus": false,
		"calculateValue": "",
		"clearOnHide": true,
		"clearOnRefresh": false,
		"conditional": {
			"eq": "",
			"when": null,
			"show": null
		},
		"customClass": "",
		"customDefaultValue": "",
		"dataGridLabel": false,
		"dbIndex": false,
		"defaultValue": "",
		"description": "",
		"disabled": false,
		"errorLabel": "",
		"hidden": true,
		"hideLabel": false,
		"id": "els02no0",
		"input": true,
		"inputFormat": "plain",
		"inputMask": "",
		"inputType": "text",
		"key": "jsonIdentityRequested",
		"label": "Champs Technique",
		"labelMargin": 3,
		"labelPosition": "top",
		"labelWidth": 30,
		"mask": false,
		"multiple": false,
		"persistent": true,
		"placeholder": "",
		"prefix": "",
		"properties": [],
		"protected": false,
		"refreshOn": "",
		"showCharCount": false,
		"showWordCount": false,
		"suffix": "",
		"tabindex": "",
		"tableView": true,
		"tags": [],
		"tooltip": "",
		"type": "textfield",
		"unique": false,
		"validate": {
			"custom": "",
			"customPrivate": false,
			"maxLength": "",
			"maxWords": "",
			"minLength": "",
			"minWords": "",
			"pattern": "",
			"required": false
		},
		"validateOn": "change",
		"widget": {
			"saveAs": "text",
			"dateFormat": "yyyy-MM-dd hh:mm a",
			"format": "yyyy-MM-dd hh:mm a",
			"type": ""
		}
	}, {
		"allowCalculateOverride": false,
		"autofocus": false,
		"calculateValue": "",
		"clearOnHide": true,
		"clearOnRefresh": false,
		"conditional": {
			"eq": "",
			"when": null,
			"show": null
		},
		"customClass": "",
		"customDefaultValue": "",
		"dataGridLabel": false,
		"dbIndex": false,
		"defaultValue": "",
		"description": "",
		"disabled": false,
		"errorLabel": "",
		"hidden": true,
		"hideLabel": false,
		"id": "els02no1",
		"input": true,
		"inputFormat": "plain",
		"inputMask": "",
		"inputType": "text",
		"key": "canalRequest",
		"label": "Champs Technique",
		"labelMargin": 3,
		"labelPosition": "top",
		"labelWidth": 30,
		"mask": false,
		"multiple": false,
		"persistent": true,
		"placeholder": "",
		"prefix": "",
		"properties": [],
		"protected": false,
		"refreshOn": "",
		"showCharCount": false,
		"showWordCount": false,
		"suffix": "",
		"tabindex": "",
		"tableView": true,
		"tags": [],
		"tooltip": "",
		"type": "textfield",
		"unique": false,
		"validate": {
			"custom": "",
			"customPrivate": false,
			"maxLength": "",
			"maxWords": "",
			"minLength": "",
			"minWords": "",
			"pattern": "",
			"required": false
		},
		"validateOn": "change",
		"widget": {
			"saveAs": "text",
			"dateFormat": "yyyy-MM-dd hh:mm a",
			"format": "yyyy-MM-dd hh:mm a",
			"type": ""
		}
	}, {
		"allowCalculateOverride": false,
		"autofocus": false,
		"calculateValue": "",
		"clearOnHide": true,
		"clearOnRefresh": false,
		"conditional": {
			"eq": "",
			"when": null,
			"show": null
		},
		"customClass": "",
		"customDefaultValue": "",
		"dataGridLabel": false,
		"dbIndex": false,
		"defaultValue": "89bad8e2-58ea-4fb4-9cf8-c5bd94400ba0",
		"description": "",
		"disabled": false,
		"errorLabel": "",
		"hidden": true,
		"hideLabel": false,
		"id": "els02no2",
		"input": true,
		"inputFormat": "plain",
		"inputMask": "",
		"inputType": "text",
		"key": "tenantId",
		"label": "Champs Technique",
		"labelMargin": 3,
		"labelPosition": "top",
		"labelWidth": 30,
		"mask": false,
		"multiple": false,
		"persistent": true,
		"placeholder": "",
		"prefix": "",
		"properties": [],
		"protected": false,
		"refreshOn": "",
		"showCharCount": false,
		"showWordCount": false,
		"suffix": "",
		"tabindex": "",
		"tableView": true,
		"tags": [],
		"tooltip": "",
		"type": "textfield",
		"unique": false,
		"validate": {
			"custom": "",
			"customPrivate": false,
			"maxLength": "",
			"maxWords": "",
			"minLength": "",
			"minWords": "",
			"pattern": "",
			"required": false
		},
		"validateOn": "change",
		"widget": {
			"saveAs": "text",
			"dateFormat": "yyyy-MM-dd hh:mm a",
			"format": "yyyy-MM-dd hh:mm a",
			"type": ""
		}
	}]
}

Error returned when I want to show the scenario which this form is linked: Argument 1 passed to Ds\Component\Resolver\Collection\ResolverCollection::resolve() must be of the type string, array given, called in /srv/api/vendor/digitalstate/core/src/Form/Service/FormService.php on line 203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants