When i tried to move around each component in Order Admin, here is what I found about "Commerce Activity Log" :
- Core Manage Display / Layout Builder : Commerce Activity Log always show in the bottom of the page and no where allow me to move it.
- In Display Suite (DS) : Commerce Activity Log is disappear in Manage Display
So, I asked Claude to fix this for me and this is the code to fix it. The detail info below :
- Currently injected unconditionally via hook_preprocess_commerce_order() into template variables
- Not exposed as an extra field so placement/visibility cannot be controlled
- Causes double-rendering or disappearance when DS or LB takes over the entity display
- Patch exposes it as a proper pseudo-field while keeping backward compat via the preprocess skip guard
| Comment | File | Size | Author |
|---|---|---|---|
| expose-activity-log-field-pipeline.patch | 3.33 KB | abx |
Issue fork commerce-3601314
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
abx commentedWhat the patch does
Adds:
- entityExtraFieldInfo() — registers commerce_activity_log as a pseudo-field on all order bundles, visible by default (visible: TRUE so existing sites see no change)
- commerceOrderView() — renders the activity view into the build array when the pseudo-field is enabled, respecting the weight set in Manage Display
Modifies:
- preprocessCommerceOrder() — now skips if the pseudo-field already rendered it, preventing double output. Backward compat preserved for themes using {{ order.activity }} directly.
Comment #4
abx commented