Updated segmented control / select / other select fields(?) are broken when used with URL parameters

After the update that apparently happened overnight, various segmented controls we have are now broken, with nothing selectable, whether they're set into Mapped mode (with the automatically migrated data) or in Manual mode. I have no idea why it's happening, but in the left panel the broken segmented controls have disabledByIndex values of true for every index, even if I put it into Manual mode and manually enter Disabled of false for every entry.

This is happening inconsistently for random segmented controls, and in one case started happening to one that was previously working after saving an update to the Retool app.

Edit: After some testing, substituting in a brand new manually-configured select field with the same name immediately has exactly the same problem.

Edit edit: After more testing, it looks like it's the interaction with URL parameters that's breaking it. This is regardless of whether any URL parameters are even currently set - just having the field referenced in the URL parameters breaks it by setting disabledByIndex to true for every value.

At this point I've already fixed it in production by stripping out the URL parameters, so since I can't export JSON for any previous releases from the "Releases and history" modal, I could only do that by breaking the app again for our users.

However, it's easy to whip up a minimal reproduction of weird interaction issues with URL params that totally break a segmented control. See the JSON included here for an example.

{"uuid":"1967d482-96a3-11ec-ac55-7f3d34c44568","page":{"id":60077258,"data":{"appState":"[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"segmentedControlThing\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"segmentedControlThing\",\"type\",\"widget\",\"subtype\",\"SegmentedControlWidget\",\"resourceName\",null,\"resourceDisplayName\",null,\"template\",[\"^3\",[\"_disabledByIndex\",[\"~#iL\",[\"\",\"\"]],\"_values\",[\"^9\",[\"left\",\"right\"]],\"iconByIndex\",[],\"values\",[],\"_iconByIndex\",[\"^9\",[\"\",\"\"]],\"hidden\",false,\"customValidation\",\"\",\"data\",[],\"hideValidationMessage\",false,\"selectedItem\",null,\"validationMessage\",\"\",\"showInEditor\",false,\"tooltipText\",\"\",\"labelAlign\",\"left\",\"formDataKey\",\"{{ self.id }}\",\"value\",\"null\",\"labelCaption\",\"\",\"labelWidth\",\"33\",\"deprecatedLabels\",[],\"label\",\"Mode\",\"_hasMigratedNestedItems\",true,\"_validate\",false,\"itemMode\",\"static\",\"labelWidthUnit\",\"%\",\"invalid\",false,\"selectedIndex\",null,\"selectedLabel\",\"\",\"events\",[\"^3\",[]],\"_ids\",[\"^9\",[\"7114b\",\"21d6d\"]],\"iconPositionByIndex\",[],\"_iconPositionByIndex\",[\"^9\",[\"\",\"\"]],\"disabled\",false,\"labelPosition\",\"left\",\"_labels\",[\"^9\",[\"Left\",\"Right\"]],\"labelWrap\",false,\"disabledByIndex\",[],\"maintainSpaceWhenHidden\",false,\"required\",false,\"labels\",[]]],\"style\",[\"^3\",[]],\"position2\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"container\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"header\",\"row\",0,\"col\",0,\"height\",0.8,\"width\",12,\"tabNum\",0]]],\"mobilePosition2\",null,\"mobileAppPosition\",null,\"tabIndex\",null,\"createdAt\",\"~m1645838785538\",\"updatedAt\",\"~m1645838937559\",\"^<\",\"\",\"folder\",\"\",\"screen\",null]]]]],\"^E\",null,\"version\",\"2.86.7\",\"appThemeId\",null,\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[],\"appStyles\",\"\",\"testEntities\",[],\"tests\",[],\"responsiveLayoutDisabled\",false,\"loadingIndicatorsDisabled\",false,\"urlFragmentDefinitions\",[\"^9\",[[\"^3\",[\"name\",\"mode\",\"value\",\"{{ segmentedControlThing.value }}\"]]]],\"pageLoadValueOverrides\",[\"^9\",[[\"^3\",[\"name\",\"segmentedControlThing.value\",\"value\",\"{{ urlparams.hash.mode }}\"]]]],\"isGlobalWidget\",false,\"isMobileApp\",false,\"multiScreenMobileApp\",false,\"instrumentationEnabled\",false,\"customDocumentTitleEnabled\",false,\"customDocumentTitle\",\"\",\"customShortcuts\",[],\"folders\",[\"^9\",[]],\"markdownLinkBehavior\",\"auto\",\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\",\"rootScreen\",null]]]"},"changesRecord":[{"type":"PAGE_LOAD_VALUE_OVERRIDE_UPDATE"}],"gitSha":null,"checksum":null,"createdAt":"2022-02-26T01:32:30.541Z","updatedAt":"2022-02-26T01:32:30.541Z","pageId":932013,"userId":189193,"branchId":null},"modules":{}}


1 Like

Thank you for the report here and quick repro app @icopp, that helped us find the root of the issue with overriding the mapper value and start exploring fixes. It looks like this bug was introduced about 8 days ago, and we haven't seen other pending reports since then.

We have a fix rolled out behind a feature flag, but since you were able to work around it in your app we are going to keep testing the flag on Monday before making a generally available change. If anyone else sees this and is hitting a similar issue please let us know!

Again I really appreciate your work here, huge kudos @icopp :pray:!