Error: "must not be more than 0 characters"

Environment

Discourse Version: 2.7.0.beta3 ( f5b18e2a31 )

Plugin Commit: d339130

Other Plugins
discourse latest-release +132
babble ea961a4
discourse-akismet 52cdb86
discourse-assign 4e57104
discourse-auto-deactivate 5276db3
discourse-cakeday a1aabb2
discourse-canned-replies 48c5f1b
discourse-checklist 3f96f29
discourse-custom-wizard d339130
discourse-data-explorer 8ab94e3
discourse-formatting-toolbar 5d38040
discourse-locations d95c1bb
discourse-oauth2-basic df0b2c5
discourse-patreon d051a4c
discourse-question-answer ba64ba9
discourse-shared-edits 9841bc5
discourse-spoiler-alert de1b33f
discourse-user-notes 9bb2fa6
discourse-teambuild 9120e41
discourse-voting ca82bab
discourse-whos-online 27578a0
docker_manager 9feb5cb
retort 2707627

Steps to Reproduce

I created this, but I haven’t tried to REcreate this, so hopefully this description is helpful enough:

  1. Create a wizard
  2. Add steps and composer fields
  3. Make the Min Length of each field 120 (more testing showed me the error happened regardless of if the min length was set)
  4. Run the wizard and paste paragraphs from Moby Dick (or your text of choice) into the fields.
  5. See error (?)

The error seemed to show up on two different fields, but I could not find a pattern. When I changed those fields from composer to text area the error did not appear.

Example

member only site, but happy to export the json or share whatever…

Logs

Will upload some screenshots…

XHRPUThttps://psst.ministryoftheimpossible.org/w/rch_reflection_1/steps/step_5
[HTTP/2 422 Unprocessable Entity 73ms]

PUT
https://psst.ministryoftheimpossible.org/w/rch_reflection_1/steps/step_5
Status422
Unprocessable Entity
VersionHTTP/2
Transferred1.23 KB (192 B size)
Referrer Policystrict-origin-when-cross-origin

cache-control
	no-cache, no-store
content-type
	application/json; charset=utf-8
date
	Sun, 14 Feb 2021 17:13:05 GMT
referrer-policy
	strict-origin-when-cross-origin
server
	nginx
set-cookie
	_t=8fa953f50d505d7741a73d4900596566; path=/; expires=Thu, 15 Apr 2021 17:13:05 GMT; secure; HttpOnly; SameSite=Lax
set-cookie
	_forum_session=V3huR3ZrWk8xRllJSEVXaEoweGZlS3RrOElkbG9KeWlody9FZis5UHNqdloxYTFkenM0NWV0cVFUMWZVblF6THVmbzRKR3JKYkdMVGVRdXZZQUNnSGYxOUdHN2hKdjhlSmk1a25LNWwyRzVZQTJ1akVmSVZPa2ttUmJNc3RVQVQ1TkovS3YwS01wTmdBWWtBb0tmYmxBcmU5a3Y0T3dNcStjNDJkT0t6dS9lcjBJR3pQMm8vdWtXTE9xdGJZblYwLS1zNnN6M1dPL2s5dGJ6WlJIYXNybE1nPT0%3D--5606bc7eaf78f469b3e97f6d0725a01868b7cc46; path=/; secure; HttpOnly; SameSite=Lax
x-content-type-options
	nosniff
x-discourse-route
	steps/update
x-discourse-username
	SteveLambert
x-download-options
	noopen
X-Firefox-Spdy
	h2
x-frame-options
	SAMEORIGIN
x-permitted-cross-domain-policies
	none
x-request-id
	d540017f-a6b4-44c1-bbc6-3a3da84f81ec
x-runtime
	0.041773
x-xss-protection
	1; mode=block
	
Accept
	*/*
Accept-Encoding
	gzip, deflate, br
Accept-Language
	en-US,en;q=0.5
Connection
	keep-alive
Content-Length
	2141
Content-Type
	application/x-www-form-urlencoded; charset=UTF-8
Cookie
	_t=ce132ce94c586967fca347958ea5bea9; rack.session=BAh7CkkiD3Nlc3Npb25faWQGOgZFVEkiRTBmY2I2MTRmODZjMDBhZWEwNDRk%0AY2I5NjdiNWIzOGEwNDQzY2UxOWFiMzMyOThhODA2ZDg3ZGZhMTZjNjY5ZTYG%0AOwBGSSIQX2NzcmZfdG9rZW4GOwBGSSIxSGxrTERzUmZQcFZ4UlgzdXI1dDFO%0ARkpnVDdhVW5rbWNCOCtjdjZVRmpOTT0GOwBGSSIJY3NyZgY7AEZJIjE0Wkly%0Abm0wV2JkWDNxbHh4QURIeFNmdmExUDNFOHd3UFlFSlRKeGtMM1NBPQY7AEZJ%0AIg10cmFja2luZwY7AEZ7BkkiFEhUVFBfVVNFUl9BR0VOVAY7AFRJIi0zYjQ1%0AMzU4MTgyNGRjMGYzNWMwMGQ2MWU5NTk5NzZiZTMzOWI4ZTEzBjsARkkiCmZs%0AYXNoBjsAVHsHSSIMZGlzY…7AFRbAEkiDGZsYXNoZXMGOwBUewZJIgxy%0AZWZlcmVyBjsAVCIuaHR0cHM6Ly9wc3N0Lm1pbmlzdHJ5b2Z0aGVpbXBvc3Np%0AYmxlLm9yZy8%3D%0A--5c050022701a48730bc86b6934a0b36dee2a1974; _forum_session=R3YyV083THE1U3dYVjRibVVDYnBXOFpNWTZMWS9ZLzlkNWRHTTNlVVBobFV6dlBMdVdkNVRvbFg4OU9uL1ZHUllqRFlCQS9adDhON1ZYU3RWNDdJQ01yZW1DeEVhZjNwcVRIQVV0WWFkSGhHdGduUTJSQ2Y5dW44L1VITFJsWmhIRVdvSWdVYUZxL2dhc1BYMGZ6NHdVdGd4QkQwbzAremhDb3ArNXY2alR5eFZVSi9KelhYditSNllSY2cvMUtZLS12RkxqeTEwekkzSUhUdGRzZlhkN3Z3PT0%3D--05d390f017448da0e7de8d0b3efebdc802155673
DNT
	1
Host
	psst.ministryoftheimpossible.org
Origin
	https://psst.ministryoftheimpossible.org
Referer
	https://psst.ministryoftheimpossible.org/w/rch-reflection-1/steps/step_5
Sec-GPC
	1
TE
	Trailers
User-Agent
	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:85.0) Gecko/20100101 Firefox/85.0
X-CSRF-Token
	EonhSPMxyZPttobTe2KF4IevrCqrknaykoN7rdwpffUVSJnLF0jXsz1ekaL39e/Fpn5yz7VRqOzenK26VRZlmw==
X-Requested-With
	XMLHttpRequest

@slambert Thanks for the report. @fzngagan Please look at this as a priority, as it seems to be connected with your recent work. We’ve got to have a test for that feature.

1 Like

Checking now

@slambert
Currently, I can’t repro this. Are you sure setting a Min Length param causes this error message? Its the max length error message. Also, it would be helpful if you can share your wizard’s json export.

I don’t think it’s the min length, I think it may have to do with using the composer? Guessing of course.

Here’s the .json file. I changed all from composer to textarea so you’ll have to change that back to get it to reproduce (hopefully).

Thanks!

psst-wizards-1613402700.json (5.4 KB)

1 Like

I’m taking a look now.

@slambert
I’ve plugged in your vizard on my setup and its working fine.

Can you try this: Just change one of the fields back to composer and just set the min length back to 120. Don’t put any thing in the max length field.

Also, I got the same message when I actually set the max length attribute to zero but otherwise it works fine. Did you by any chance put 0 in the max length field?

Hi, I tested this twice and it worked ok. I had made some changes to the wizard since, but I can’t think of a way to get it to reproduce.

:man_shrugging:

I did suspect this and checked for it, so I know it’s not the case.

I guess mark this resolved and I’ll keep an eye out for it in the future.

THANK YOU!

1 Like