Umbraco macro placeholder IDs causing serious problems on postback
Hi guys,
At some point in time between 4.0beta and today's 4.0.4 version, Umbraco started to generate placeholder IDs for usercontrol macro's. They start with umbMacro and end with a GUID.
That means that, a component that used to have the ID
However, on postback, the GUID seems to change. This inconsistency causes the ASP.Net postback system to fail. As a result, a lot of custom usercontrols do not work anymore.
Umbraco macro placeholder IDs causing serious problems on postback
Hi guys,
At some point in time between 4.0beta and today's 4.0.4 version, Umbraco started to generate placeholder IDs for usercontrol macro's. They start with umbMacro and end with a GUID.
That means that, a component that used to have the ID
ctl00_ctl00_ctl00_ContentPlaceHolderDefault_BoostMasterContentPlaceHolder_ctl01_ctl01_Name
now has the ID
ctl00_ctl00_ctl00_ContentPlaceHolderDefault_BoostMasterContentPlaceHolder_ctl01_umbMacrod4402495-9c49-4fc0-9868-858dca74decd_Name
No problem so far.
However, on postback, the GUID seems to change. This inconsistency causes the ASP.Net postback system to fail.
As a result, a lot of custom usercontrols do not work anymore.
Can you check this?
Ruben
I wonder if this is related to bug #27128... Verifying that right now.
Part of the issue is resolved: Javascript validation is working again, thanks to underscores in the GUID instead of dashes.
However, the main issue has not been solved: ASP.Net postback is broken because the GUID is different on postback.
Proposed solutions:
Good to hear from you again Ruben
Would be interesting to hear the background for this change. Seems to be related to caching somehow.
Niels has already said there was a problem and that you shouldn't upgrade to 4.0.4, while he fixes it for (assumeably) 4.0.5
I think he only fixed the dashes, and not the fact that the guid changes between postbacks,
I've seen Niels just uploaded a fix to Codeplex. Let's test.
Ok, this should work. The source code removes the ID assignment. Compiling and verifying... (Codeplex is slow!)
It works. Thanks Niels.
PS Darren got a 303 symphonic music video for his report. I wonder which one I will get ;)
is working on a reply...