WeakAuras

WeakAuras

206M Downloads

Custom code does not disappear when erased

Zidras opened this issue ยท 2 comments

commented

Describe the bug

Custom code does not get removed from the weakaura if custom code window is used at least once and gives warning that it contains custom code when importing, even after clearing whatever code window was used.

Do you have an error log of what happened?

No error.

To Reproduce

Steps to reproduce the behavior:

  1. Create new aura (example: icon)
  2. Under trigger tab, expand custom function trigger activation logic.
  3. Type anything (example: snippet already provided by Weakauras) and click Done
  4. Go back to the code window, expand, Ctrl+A and hit backspace/delete.
  5. (optional) Change to any/all triggers
  6. Generate export string and paste it into import. Aura is considered to have custom code, despite efforts to delete it.

Wago test aura: https://wago.io/Xwzn-K-v0
If importing Wago string, skip steps 1-5.

Screenshots

All the steps, no Wago import:
image
Wago import:
image

Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?

Only Weakauras enabled.

Which version of WeakAuras are you using?

3.2.2 release

Are you on World of Warcraft Classic or Retail?

  • Classic
  • Retail

Was it working in a previous version? If yes, which was the last good one?

No, afaik it has always had this issue.

Additional Info

Removing all the auto-generated spaces did not work and always defaulted to the aura considered to "having code".
This was reproduced by using Custom activation code window, but it is worth looking into it happening on all the other code sections (init, custom triggers, display %c, etc)

commented

Thanks @InfusOnWoW for the fix. Although the code warning is effectively gone, from the commit and very light testing, I believe this still leaves remnants in the savedvar itself, which was ultimately what was causing the code warning in the first place.
Example:
image

I think this remains true for all custom code blocks that are created in the aura lifetime, even if they are "blank".
Could you kindly recheck this? Thank you for your time

commented

Yes that's correct. We don't remove the data that you put in, even if it's just two newlines.