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

CommentFileSizeAuthor
expose-activity-log-field-pipeline.patch3.33 KBabx

Issue fork commerce-3601314

Command icon 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

abx created an issue. See original summary.

abx’s picture

What 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.

abx’s picture

Status: Active » Needs review

jsacksick made their first commit to this issue’s fork.

  • jsacksick committed d3125605 on 3.x authored by abx
    feat: #3601314 Order admin page - Activity log not placeable in Manage...
jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

leducdubleuet’s picture

This 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?

leducdubleuet’s picture

Ok 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.

jsacksick’s picture

@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.

  • jsacksick committed a6905f48 on 3.x
    #3601314 followup: Make the new activity log pseudo field non visible by...
leducdubleuet’s picture

@jsacksick: Thank you very much for this quick turnaround and the new release!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.