fix(options): use the dialog's Text font string in the Hardcore import popup - #6328
Closed
GisliRAxels wants to merge 1 commit into
Closed
GisliRAxels wants to merge 1 commit into
GisliRAxels wants to merge 1 commit into
Conversation
…t popup On Classic Era 1.15.9, StaticPopup dialogs come from the reworked GameDialog template: StaticPopup1-4 inherit StaticPopupTemplate, whose font string is the Text key, and GameDialogMixin:GetTextFontString() returns self.Text. There is no .text field, so the OnShow and OnHide handlers of WEAKAURAS_CONFIRM_IMPORT_HARDCORE raise "attempt to index field 'text' (a nil value)" whenever an aura with custom code is imported on a Hardcore realm. The popup is only created on Classic Era with Hardcore active, so it reads self.Text directly. Fixes WeakAuras#6323
Contributor
|
There's already a fix for this pending. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On a Classic Era Hardcore realm, importing an aura that contains custom code shows
WEAKAURAS_CONFIRM_IMPORT_HARDCORE, and both of its handlers throw:Failure path on Classic Era 1.15.9 (69722):
ImportcallsStaticPopup_Show(Update.lua:1647), which callsdialog:Show()(Blizzard_StaticPopup/StaticPopup.lua:391).OnShowscript isGameDialogMixin:OnShow(Blizzard_StaticPopup_Game/GameDialog.lua:690). It callsStaticPopup_OnShow, which calls this popup'sOnShow.StaticPopup1–4inheritStaticPopupTemplate(GameDialog.xml:78). That template's font string isparentKey="Text"(GameDialog.xml:94), andGameDialogMixin:GetTextFontString()returnsself.Text..textfield, so both handlers index nil.#6323 reports that the import cannot be confirmed while this happens.
The popup is only created on Classic Era with Hardcore active (
WeakAuras.IsClassicEra() and C_GameRules.IsHardcoreActive()), so it now readsself.Textdirectly. For comparison,WEAKAURAS_CONFIRM_REPAIR, which runs on every client, readsself.Text or self.text.Fixes #6323
Type of change
How Has This Been Tested
(self.Text or self.text)change on a Hardcore realm. On 1.15.9 that evaluates toself.Text, the field this change reads.git diff --checkis clean, and the file parses with LuaJIT (Lua 5.1 syntax). Luacheck was not available locally; CI runs it.Checklist
Written by an agent (Claude Code, claude-opus-5-5).