PSA: XPages Breaking Changes in 14.0 FP3
Mon Dec 16 14:08:27 EST 2024
- AbstractCompiledPage, Missing Plugins, and MANIFEST.MF in FP10 and V10
- Domino 11's Java Switch Fallout
- fontconfig, Java, and Domino 11
- Notes/Domino 12.0.2 Fallout
- Notes/Domino 14 Fallout
- PSA: ndext JARs on Designer 14 FP1 and FP2
- PSA: XPages Breaking Changes in 14.0 FP3
TL;DR: If you use XPages, don't use Domino 14.0 FP3. To fix the unrelated mail-routing bug, use the IFs for 14.0 FP2 or any earlier version. For the curious, the below bugs are tracked in HCL as SPR #RKRYDC2MHV.
(Updated 2024-12-17 below)
Fix Pack 3 for Domino 14.0 came out last week and, in addition to the usual spate of fixes you'd expect from an FP, it brought a potentially-significant and -breaking change to the way XPages handles style attributes for components. This is presumably in the interest of supporting the pathological strictures of Content-Security-Policy
, but it applies whether or not you have taken any other steps to implement CSP.
The specific change is that the XPages renderers will now take the style
attribute, externalize it to a class, and then make a <style>
block for it. Take this XSP markup:
1 | <xp:text style="color: red" value="I should be red"/> |
While the above XSP was rendered as <span style="color: red">I should be red</span>
on all previous versions, the rendered HTML (with unnecessary bits removed) now looks like this:
1 2 3 4 5 6 7 | <span class="xc1">I should be red</span> <style> .xc1{ color: red } </style> |
In this example, the results are equivalent: the text is red. However, this breaks in more-complicated examples. For example, say you have this in your XPage:
1 2 3 4 | <xp:text style="color: red" styleClass="foo" value="I should be red"/> <style> body .foo { color: green } </style> |
(The <style>
block could just as easily be an external stylesheet for this purpose.)
In this case, the resultant HTML is:
1 2 3 4 5 6 7 8 | <span class="xc1 foo">I should be red</span> <style>body .foo { color: green }</style> <style> .xc1{ color: red } </style> |
...and the text is green, though it should not be. Inline style attributes have a level of specificity that isn't quite equivalent to any other selector construct ("!important" rules included), so this change leads to insidious problems as things get more complicated. While inline styles have always been something of a faux pas, they're extremely common, all the more so for us because Designer encourages it and the official XPages tutorial tells you to use them.
Unfortunately, these changes are not opt-in and, because the problems are not technically errors, you won't see any console or error logs about it, and just looking at a page may not make visual changes (if there are any) immediately obvious. When using afflicted versions, the only real way to see if you need to change anything for now is to check each application manually to see if it breaks.
In the mean time, if you're upgrading 14.0 servers to account for the recent mailing problem and have XPages applications in production, I recommend sticking with Fix Pack 2, which got an Interim Fix 2 release to fix mail. If you're in the 14.5 Early Access program, it would probably also be helpful for you to chime in with your own experiences in the thread I made in the forum.
Update: Discussions in the OpenNTF Discord have highlighted several side effects or related changes that break xe:dialog
elements and add extra <span>
s around <xp:text>
s that previously didn't have them, breaking more apps. Accordingly, my advice to not use 14.0 FP3 is only stronger now.
Glen Urban - Tue Dec 17 04:23:12 EST 2024
We're using the application layout control and oneui. It looks like 14 FP3 has broken this. Thankfully we've just upgraded our test server so I've got time to try and fix it.
Thomas - Wed Dec 18 10:27:57 EST 2024
if you already upgraded to fp3, you can re-install v14 + FP2 + IF1