[UE5.1.1, Bug report] Widget does not set text unless asset is reloaded.

  1. Create a UserWidget “Button” holding a textblock widget and a text property ButtonText.

  2. On Button’s (blueprint) PreConstruct, set textblock text to text of property ButtonText.

  3. Add Button to a new UserWidget “Panel”.

  4. Configure Button’s text property ButtonText through Panel’s editor panel.

~~
5. Be amazed how it can randomly completely forget the value set from the editor panel on Panel and revert back to the placeholder text set on Button.

Workaround: Hit reload on all affected widgets and panels, save them and push everything back to version control. What is all this weirdness??

You ought to bug report all this stuff :slight_smile:

I found this in UE4.25 and it’s still there on new projects, someone must have an explanation :slight_smile: . I mean I haven’t ran into something like “Placeholder” yet in the bigger games (OK except in LIS before the storm which had missing strings) but eh that is a different issue. I just want to get to work… By now I’m an engine bug hunter and it surely isn’t what I had in mind.

1 Like

Bump, any fix for this? Incredibly annoying behavior, happens very often. The workaround is reloading the affected asset. Known bug? I can’t risk this happening after packaging

afbeelding

This actually happens every startup now. There’s nothing in c++ or blueprint code which affects this, as noted it is loaded properly after reloading the asset, but I got to do that every single time i load up the editor. How can this happen it’s 2023. One way it apparently gets less is when you reload and resave every single affected widget at once. After that you can restart the engine and enjoy it while it lasts…

Absolutely EPIC. The widget editor joins the party.

That header is a blueprint directly inheriting from UserWidget, no logic in it but to set the text of a text widget to the value of a text property on PreConstruct.

No one came across this out of the box behavior?

Have you tried maybe using the “Force Layout Prepass” node before the SetText?

Hi thanks for the suggestion! I added it for the header widget:

But the results are the same. The header is just one of the misbehaving widgets, all set the text from the value of a text property.

Strangely, this issue occurs either in the editor or in-game (or both) and seems to be related to the state of the parent widget somehow. What I mean by that is that when the header all of sudden starts to misbehave nested on one menu, it can still show up fine if that menu is nested on another UserWidget.

The trigger for the issue seems entirely random and temeporarily goes away if you hit “reload asset” on as many related UserWidgets as possible.

:unicorn:

:face_in_clouds:

@Jamie_Dale Hi Jamie, you know a lot about the localization system, do you know what might be going on here in UE5?

Out of curiosity where are you setting the placeholder text?
I’ve noticed it seems to play nice it you leave the textblocks default text empty and only set the default value on the string that passes in text to the button on pre-construct.

Sadly no :confused: . I tested it just now, specifically cleared the textblocks default text, saved, then reconnected the PreConstruct method which sets the text from a text property. The text property holds the placeholder value. I restart the game and it simply says “Placeholder”. Then I reload the button asset and it gets the correct value. The correct value is set by a parent UserWidget which holds a list of buttons, there for each button the text property is set to a localized value on the editor panel. Crazy right? It’s not even everywhere it’s just random if it happens on a certain UserWidget both game and editor. Once it happens it stays.

afbeelding

afbeelding

It’s not some weird hidden logic this happens on 100% blueprint widgets directly inheriting from UUserWidget

list of buttons as in a listview?

Nah, like any panel. Be it a vertical / horizontal box, an overlay, etc. I just display pre styled UserWidgets containing a text block and maybe a background, nothing fancy. The buttons and header shown above are an example of those pre styled assets. All set the text the same way and all have the same bug. I suspect the localization system itself at this point, or the Widget refuses to read the value set by its parent through that public text property.