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

Deletion warning when adding options to Select Options field #47

Open
Toutouwai opened this issue Feb 24, 2020 · 5 comments
Open

Deletion warning when adding options to Select Options field #47

Toutouwai opened this issue Feb 24, 2020 · 5 comments

Comments

@Toutouwai
Copy link
Contributor

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:

options

When Tracy is disabled I don't get this notice when adding options.

@adrianbj
Copy link
Owner

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?

@Toutouwai
Copy link
Contributor Author

Yes, it does seem to be the RequestInfo panel that's involved.

@adrianbj
Copy link
Owner

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?

@Toutouwai
Copy link
Contributor Author

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.

@adrianbj
Copy link
Owner

Thanks @Toutouwai - submitted new issue for Ryan here: processwire/processwire-issues#1097

Sorry for stealing your screencast :)

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

2 participants