Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
IPCommerceFan Posted November 11, 2021 Posted November 11, 2021 4.6.7 All 3rd party apps/plugins disabledIssue: "Too many redirects" blank page when attempting to manage a purchase with a 'YesNo' field type that has the 'Used to identify purchases?' option set. (you're not supposed to be able to set this option for a 'YesNo' type) Repro: Create a nexus custom field with Field Type of Text, and specify 'Used to identify purchases?' Assign the field to a package, and generate a purchase with said package in it. Go to Manage Purchases, confirm the purchase can be managed. Change the field type to 'YesNo' (or some other type that doesn't use the 'Used to identify Purchases' toggle) Attempt to manage the purchase. This should result in a URL that apparently contains the csrf key appended to it, and a "ERR_TOO_MANY_REDIRECTS" browser error. "No code" fix: Change the custom field back to 'Text' De-select 'Used to identify Purchases' Save Change the type back to 'YesNo' Save I confirmed changing the setting for 'Used to identify Purchases' fixes this, but I figure if I ran into this organically, someone else might as well too and would come to support for help with it. Frankly I had no idea why I was suddenly unable to manage some purchases for a good while. lol Here's what some poking around the $values revealed when saving the form: Text -> Utip enabled: "cf_sticky":true Text -> Utip disabled: "cf_sticky":false YesNo -> Utip disabled: "cf_sticky":false YesNo -> Utip enabled: "cf_sticky":1 It would seem the cf_sticky state is still being saved, but it is formatted incorrectly because the toggle isn't actually displayed on the form. We don't actually want any YesNo field to be sticky though, since its not really useful info, so I'd suggest doing something like this in \IPS\nexus\Package\CustomField::formatFormValues() if ($values['cf_sticky'] === 1){ $values['cf_sticky'] = FALSE; } Tested via plugin, it fixes the problem. [/Fringe case] lol
Solution Stuart Silvester Posted November 15, 2021 Solution Posted November 15, 2021 Thanks for the report, this should be fixed in a future release. IPCommerceFan 1
Recommended Posts