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 commentedComment #7
jsacksick commentedComment #9
leducdubleuet commentedThis now prevents the activity log to be displayed like before under the main container, it is always displayed in the right column instead. I tried to override the template with no success. How to put back the activity log in the left main column instead of always in the right one?
Comment #10
leducdubleuet commentedOk I succeeded by removing the new "Activity log" pseudo-field from the order display and now it is back where it was before. This seems counterintuitive to me and that new pseudo-field should be disabled by default so existing sites see no change like stated in comment #3.
Thank you.
Comment #11
jsacksick commented@leducdubleuet: You're right... Should have tested this manually... We should change the "visible" flag to FALSE so it's not exposed by default.
I tagged a followup release with that fix.
Comment #13
leducdubleuet commented@jsacksick: Thank you very much for this quick turnaround and the new release!