- Issue created by @wim leers
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
wim leers β credited penyaskito β .
- Merge request !918#3519878: ContentCreatorVisibleXbConfigEntityAccessControlHandler's `view` access must refuse access to disabled config entities β (Closed) created by penyaskito
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
This has new tests, removes
xb_visible_when_disabled
, and behaves the same way as HEAD.
The only issue is that JavaScriptComponent is singled-out:$require_status_true = match ($xb_config_entity_type->getHandlerClass('access')) { ContentCreatorVisibleXbConfigEntityAccessControlHandler::class => FALSE, XbConfigEntityAccessControlHandler::class => ($xb_config_entity_type->id() !== JavaScriptComponent::ENTITY_TYPE_ID), default => throw new \LogicException(), };
This means that Pattern probably should have had the
xb_visible_when_disabled
flag too.
NR for confirmation. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
wim leers β credited larowlan β .
- πΊπΈUnited States mglaman WI, USA
mglaman β changed the visibility of the branch 0.x to hidden.
- Merge request !1099#3519878: ContentCreatorVisibleXbConfigEntityAccessControlHandler's `view` access must refuse access to disabled config entities β (Merged) created by mglaman
- πΊπΈUnited States mglaman WI, USA
RTBC, rerolled @penyaskito work. Called out a few items to discuss which look OK.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This lost multiple performance optimizations for the crucial
/xb/api/v0/config/component
response β which is what is a critical factor in booting the XB UI! This is a big, and expensive response, and so the existing optimizations must be kept if at all possible.Posted comments on the MR to explain this and pushed commits to bring those back while staying true to the spirit of the issue. There's at least one failure in need of debugging still.
Approved on the assumption that the remaining failure will be fixed while keeping both optimizations (the config entity query optimization as well as the cache tag response header optimization).
- πΊπΈUnited States mglaman WI, USA
CI failing but Wim made good fixes, I'll address
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Dug deeper, because this can't land without passing e2e tests that this caused to fail.
The root cause for all the painful bits that were surfaced here is
type: field.value.datetime
. Introduced in 2014. Zero issues mention it! π€―- It dates back to #1989468-4: Weird messing with 'default_value_function' in date widgets ? β (June 5, 2013 β aka 12 years and 1 day ago today), which I apparently reviewed (zero recollection)
- It has been causing confusion for years: π¬ The configuration schema for datetime doesn't describe the field properties the way other field types do. Closed: works as designed .
- It's actually still actively being refined: π Better handling of timezones for relative default date + times Active .
Wow! π€―
I first wanted to open an upstream (core) issue titled
Allow creating a default field value from a valid field value
β but then I realized that literally defeats the point of #1989468-4: Weird messing with 'default_value_function' in date widgets ? β β the very point is that no hardcoded value makes sense for datetime β only: "now" and "X time before/after now".So, instead opening an XB follow-up. Because this is the first time the shape matching logic and infrastructure ends up β¦ not working. π¬
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Attempted to fix it here, by special-casing the
datetime
anddaterange
field types in::computeDefaultFieldValue()
. π€Need to shift to other things nowβ¦
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Manual testing suggests that I succeeded in adding
::processDefaultValue()
support? π€ - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
FYI: this is wildly out of scope here, but it happens to have been surfaced here π¬π
Fortunately, all the access control changes are basically trivial, which is why this MR's size is still very manageable. So if #20 passes, then I'm gonna go ahead and merge, so we can all move on and pretend this was a bad nightmare π§ββοΈ
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I hope all remaining failures are solved by π Deterministic Component version hash should depend not only on source-specific settings, but also slots + explicit input schema Active . Because they are AFAICT all like this:
[versioned_properties] The version 6c1061657e221db7 does not match the hash of the settings for this version, expected 0273dc5c85818057.
- πΊπΈUnited States mglaman WI, USA
This is postponed because we added lookup keys, right? Can we un-postpone this ticket is adding lookup keys for performance was spun out and blocked on that other ticket? That way we land the new access handlers albeit with a performance hit until lookup keys added?
Edit: we can still keep condition check but just not check lookup keys, so same as it was before
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Excellent call, @mglaman. Will make it so.
Note that lookup keys already exist (
PageRegion
uses them too). But it's the combination ofApiConfigControllers::list()
being modified here- restoring the
Component
config entity's lookup keys, to keep the intended optimization, even though it's absent in HEAD - a very old bug obscured through multiple layers of abstraction
β¦ that caused it to go unnoticed.
Splitting out is worth it here to A) allow progress, B) improve archeology. Will do so π
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Done.
I'm calling it a day β π Deterministic Component version hash should depend not only on source-specific settings, but also slots + explicit input schema Active was incredibly tricky too. Braindead now.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I'll need to file a follow-up next week to bring back https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...
-
wim leers β
committed 8c1737e1 on 0.x authored by
mglaman β
Issue #3519878 by wim leers, penyaskito, mglaman, larowlan:...
-
wim leers β
committed 8c1737e1 on 0.x authored by
mglaman β
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Merged!
Happy weekend everyone.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
Created π Implement `lookup_keys` in Component for optimized queries Active
- Issue was unassigned.
- Status changed to Fixed
3 days ago 5:29pm 20 June 2025 Automatically closed - issue fixed for 2 weeks with no activity.