Skip to content

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

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

[Port to dspace-8_x] Fix for double view events when using dynamic themes#4232
tdonohue merged 4 commits intoDSpace:dspace-8_xfrom
atmire:4099-duplicate-view-events_contibute-8.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 8.2 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 this code is the same as #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 208e779 into DSpace:dspace-8_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
4science-it pushed a commit to 4Science/dspace-angular that referenced this pull request Mar 24, 2026
[DSC-2716] show markdown info panel in cms metadata edit

Approved-by: Francesco Molinaro
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