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

Fix HTML5 one click button being active with templates missing #35680

Closed
wants to merge 2 commits into from
Closed

Fix HTML5 one click button being active with templates missing #35680

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 29, 2020

The editor would previously have the HTML5 one click deploy button is always visible if an HTML5 preset has been defined, even if the templates are missing or if it's misconfigured.
This disables the button in these cases and provides the error message output of can_export as the tooltip of the disabled button.
Fixes #35592.

This is my first attempt at a change on this project - if anything is wrong, apologies, please let me know.

Jack Bond-Preston added 2 commits January 29, 2020 01:47
The editor would previously have the HTML5 one click deploy button is always
visible if an HTML5 preset has been defined, even if the templates are missing
or if it's misconfigured.
This disables the button in these cases and provides the error message output
of can_export as the tooltip of the disabled button.
Fixes #35592.
@YeldhamDev YeldhamDev added this to the 4.0 milestone Jan 29, 2020
@YeldhamDev YeldhamDev added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 29, 2020
@YuriSizov YuriSizov requested review from a team August 24, 2021 22:38
}

if (preset.is_null()) {
menus[i]->set_disabled(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will crash if menus[i] is null (which might be possible, considering the code in ENTER_TREE). You need to add a null check.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 10, 2022

The issue mentions #35570, which is no longer needed after this change. The button will be disabled if the template is invalid, so there is no way to trigger that bug. (I didn't test though)

@ghost ghost closed this Jul 3, 2022
@ghost ghost deleted the deploy-button-active-fix branch July 3, 2022 03:30
@akien-mga akien-mga added archived and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Jul 3, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML5 one click deploy button is always active, even if misconfigured
3 participants