Widget class of widget component set to PLACEHOLDER-CLASS_something when restarting editor

Hello everyone,

I’m trying access some text from a widget and set its value like this:

The text is set fine. However, when I restart the editor, the first thing I see is that my widget class in the widget component is set to a PLACEHOLDER_CLASS:

This only seems to happen when I have a connection to “Cast To” the blueprint type. When I disconnect the link to cast to tracksign, the widget class of the widget component stays tracksign when I restart the editor. It doesn’t only happen if I do it in begin play, it happens when I do it anywhere in the blueprint.

Hello Cyborgking,

After doing a bit of digging around, I have found that this is a known issue (UE-9824) and that it has been fixed internally. It should be available in a later release of the engine. I hope that this helps. Thank you for your time and information.

Make it a great day

Good to hear that it has been fixed! Do you have an idea how to handle this problem in the time till the release? I don’t mind doing a little tweak to the engine’s source if I have to.

Hello Cyborgking,

I do not currently have a workaround for this issue, however if you do come up with one could you please post it as a reply so that anyone else that runs into this issue could have a solution as well?

Hi Rudy,

Can you reference the github commit that fixes this so I can pull this into my source?

Hello ,

Here is the commit that you requested. I will also be providing a second link. The second one was a commit to help clear up a few errors that this first commit created. I hope this helps.

First:
https://github.com/EpicGames/UnrealEngine/commit/db2519d66c7be26166e7b25d41926b2213f010eb

Second:
https://github.com/EpicGames/UnrealEngine/commit/9102b465aac8ff511e7e639279d62825ef135d09

Make it a great day

You sir are a gentleman and a scholar.

Thanks, exactly what I was looking for.

Hi Rudy,

These are big changes to cherry pick, and they depend on other changes (like NewObject<> has changed). Do you have a list of commits that need to be pulled from 4.7 to make this compile?

Thanks!

Hello ,

Unfortunately we do not have the ability to determine what previous commits would be required to ensure that a certain commit works correctly.

Workaround is to alter the Widget Component to allow you to set the class and to call InitWidget from Blueprint.

Hey Rudy, I experience this issue in 4.10. The widget is set to PLACEHOLDER after every engine restart. Is this a known bug again or should it still be fixed?
It might be related to the fact that I set the widget class in a child actor of the actor where the WidgetComponent is added.

Hello,

I ran through the report for this issue and tested it in the 4.10 release. I found that this particular issue has been resolved. This means that you are experiencing a different issue. If you would like, you could create a new thread and post the link in a reply. I will then be able to assist you further. I would like to mention that there is a known issue (UE-21098) that deals with “Placeholder” classes showing up in Blueprint as a result from cyclic dependencies. Please provide as much information as possible in the new thread to help reproduce this issue on our end.

Make it a great day

Thanks Rudy,

I guess the issue I get is this one: [4.9.2] Widget Component Class resets - UI - Unreal Engine Forums

The description sounds exactly same like the bug here in this thread, so I wonder why it’s a separate bug.

This isn’t fixed yet. i’m still facing this in 4.10

Hello ,

As mentioned above I have ran through the steps in the report for this issue and it appears to have been resolved. The issue that you are experiencing may be separate from the issue that is mentioned in this thread. If you like you could start a new thread with more information on how to reproduce this issue in a clean project and then post the link in a reply and I will be happy to assist you further.

Make it a great day

i still have the same problem in 4.11.2.
Every time i load the project, the WidgetComponent’s WidgetClass is set to PLACEHOLDER_EnemyStats_C_8 instead of simply inheriting “EnemyStats” from its parent.

I have no idea what’s going on, or what i’m doing wrong … it is very annoying to re-set all the classes after every load.
(maybe this is what the “uses experimental class” warning is about?)

Hello grilly,

As mentioned above I have ran through the steps in the report for this issue and it appears to have been resolved. The issue that you are experiencing may be separate from the issue that is mentioned in this thread. If you like you could start a new thread with more information on how to reproduce this issue in a clean project and then post the link in a reply and I will be happy to assist you further.

Make it a great day