TracyDebugger
TracyDebugger copied to clipboard
Deletion warning when adding options to Select Options field
Not sure why Tracy would affect a Select Options field in this way, but I've noticed that I get a warning about deleting options when I am adding options to a new Select Options field that does not yet have any options.
Screencast:
When Tracy is disabled I don't get this notice when adding options.
Hi @Toutouwai - I've actually noticed this myself a couple of times lately, but never figured out what was causing it. That said, I can't reproduce now at all, so not sure where to start at the moment.
My hunch is that it might be related to the RequestInfo panel getting the field's settings - does the problem go away with that panel disabled?
Yes, it does seem to be the RequestInfo panel that's involved.
OK, so I sort of have it narrowed down.
Strangely it doesn't happen on my local dev the same way - instead the redirect version of the RequestInfo panel returns an error, but on the remote servers I tested, I get the same result as you.
The initial trigger is that panel's call to $field->getExportData()
. I have traced it through to the Select Options field's attempt to populate $deletedOptionIDs
I feel like this is something that Ryan needs to fix in either the core getExportData()
method, or some of the logic in the Select Options field around when to display the field deletion dialog.
Any thoughts before I post an issue for him?
Great that you've been able to track down the cause.
I can't think why exporting the config of a Select Options field should cause the deletion warning so it does sound like an issue Ryan should look at.
Thanks.
Thanks @Toutouwai - submitted new issue for Ryan here: https://github.com/processwire/processwire-issues/issues/1097
Sorry for stealing your screencast :)