Skip to content

[Port to dspace-7_x] Fix for double view events when using dynamic themes#4233

Merged
tdonohue merged 6 commits intoDSpace:dspace-7_xfrom
atmire:4099-duplicate-view-events_contibute-7.x
Apr 23, 2025
Merged

[Port to dspace-7_x] Fix for double view events when using dynamic themes#4233
tdonohue merged 6 commits intoDSpace:dspace-7_xfrom
atmire:4099-duplicate-view-events_contibute-7.x

Conversation

@LotteHofstede
Copy link
Copy Markdown
Contributor

References

Description

This PR moves the tracking of view events for the purpose of registering statistics from a component to a resolver.
This resolves the mentioned issue that whenever a component is pre-rendered before the page is able to load the dynamic theme and load the final version of this component, the view event won't be triggered twice.

Instructions for Reviewers

Add the following to your configuration

themes:
  - name: custom
    extends: dspace
    handle: 10673/1161
  - name: dspace

Load an item page for an item in the 10673/1161 community while your Network DevTools tab is opened. This should only trigger a single "viewevents" call to the backend once this PR is applied.

@tdonohue tdonohue added themes 1 APPROVAL pull request only requires a single approval to merge labels Apr 22, 2025
@tdonohue tdonohue added this to the 7.6.4 milestone Apr 22, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace Maintenance (9.x, 8.x, 7.6.x) Apr 22, 2025
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Verified code looks the same as #4232 and #4231. Tested via #4231.

@github-project-automation github-project-automation Bot moved this from 🙋 Needs Reviewers Assigned to 👍 Reviewer Approved in DSpace Maintenance (9.x, 8.x, 7.6.x) Apr 23, 2025
@tdonohue tdonohue merged commit 7b25b1d into DSpace:dspace-7_x Apr 23, 2025
15 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace Maintenance (9.x, 8.x, 7.6.x) Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug component: statistics themes

Projects

Development

Successfully merging this pull request may close these issues.

2 participants