Forum Discussion
MSOZoneCell_WebPart WPQ ID is keep changing
Hey Sal_Sal
I've been having the very same issue. My case is somewhat similar to yours, where I have been using JavaScript, but I'm using it to toggle some form inputs to show/hide depending on a selection of a drop down. The id attribute of the web part itself keeps changing randomly on it's own timing in a way that I can't control, in turn, breaking my JavaScript functions. Thing is, this particular web part is actively being used at the office and when this occurs, I always have to notify the entire team to stop using it until I fix it, which in turn affects business processes in the end, each time.
I have been attempting to come up with another way to approach this issue, by attaching a custom id attribute to the DOM elements I want to target, but the changing of the original id is preventing me from doing so.
All in all, I would also like to know why this occurs, because it is severely affecting internal processes. I am in the process of developing this web part into a more robust web part using SPFx with React, however in the meantime, as quickly as I'm trying to learn SPFx, I would really need the classic web part to continue to work as it should.
Can more light be shed on this issue please?
Thank you.
- Patrick BorgschulteOct 14, 2019Brass Contributor
Hello Yarrah,
Cool, in the beginning I thought I was doing something wrong. Now it is more and more obvious there is some kind of undesired behaviour. I already got our IT issuing a ticket with Microsoft. Let's see, what's happening ...
Patrick
- SwissTiQSep 28, 2020Copper Contributor
Patrick Borgschulte Did you ever got feedback from MS on how to work around this issue?
- YarrahOct 14, 2019Brass Contributor
Hey Patrick Borgschulte,
That's great! I would appreciate if you can relay the feedback to us here IF possible. In the meantime, I guess all I can really do with this issue is work around it, like I always have to do. I mean, I'd also expect someone in support to notice our comments then shed some light on this post here as well, so I'm hoping for the best...
- Patrick BorgschulteOct 18, 2019Brass Contributor
Yarrah We are in contact with Microsoft at the moment. I keep you posted.