Closed (outdated)
Project:
Drupal Canvas
Version:
1.x-dev
Component:
Config management
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Aug 2025 at 18:35 UTC
Updated:
17 Sep 2025 at 19:39 UTC
Jump to comment: Most recent
Comments
Comment #3
wim leersConcerns
It's not that simple.
We're actively working on bringing the MVP for end-to-end
ContentTemplatefunctionality to 1.0 in ~1 month: see the plan at #3541000: [META] Content templates UI for 1.0: only nodes, no exposed slots, no replacement for the view mode/display UI.That means any
ContentTemplatethat Drupal CMS would manually craft (that includes adapted prop sources) SHOULD be viewable/editable in that UI.However, no designs and no implementation work exists at all nor is scheduled to update the UI (JS) nor the
ComponentInstanceformto support adapted prop sources.tl;dr: what you're asking (demanding, almost 😅) would result in a crashing UI.
Suggested next steps
Comment #4
phenaproximaUpdated!
Comment #5
phenaproximaComment #6
lauriiiCould we please split this to two separate issues? I'm not sure that adapted prop sources is what's needed here. You should be able to map date field to a
format: datestring. If that's not the case, that's a bug on it's own.Comment #7
phenaproximaComment #8
lauriiiComment #9
wim leers@lauriii in #6: But the
createdfield onNodes doesn't uses a "date" field:which uses
class CreatedItem extends TimestampItemaka a UNIX timestamp.type: string, format: datedoesn't accept UNIX timestamps. That's why @phenaproxima was using\Drupal\canvas\Plugin\Adapter\UnixTimestampToDateAdapter, which literally provides that conversion.The only way around that is Canvas adding a new computed property onto the
createdfield type: that'd elegantly work around this 👍(Which is what Canvas is doing in a multitude of places, and which @phenaproxima has cleerly started doing too: see #7 and #3545859-2: Add a `host-entity-url` prop source for linking to the host entity.)
Comment #10
phenaproximaI'm going to do this in Mercury with a less invasive (no need to mess with field types) approach specific to that one component: https://www.drupal.org/project/mercury/issues/3547303
Comment #11
wim leersNever before heard of https://www.drupal.org/project/mercury 😅
#3547303: The hero-blog component's `date` prop needs to be a timestamp has a side benefit that there'll be less update path concerns 👍
Comment #12
wim leersBetween #3547303 and #3545859: Add a `host-entity-url` prop source for linking to the host entity … does that mean the "critical" tag can be removed, and … this issue can actually be closed?
Comment #13
phenaproximaYes, and done!