Hi, I’m experiencing an issue with the Zendesk plugin’s “View on Zendesk” button behavior. When a ticket already exists in Zendesk, the button displays as “View on Zendesk” correctly. However, if I navigate to a different topic that doesn’t have a corresponding Zendesk ticket, the button still initially shows “View on Zendesk” instead of “Create Zendesk Ticket” Once I refresh the page, the button updates to show the correct “Create Zendesk Ticket” option.
It seems that the button component isn’t re-rendering upon navigation to a new topic. I believe a solution could involve triggering a re-render of this component whenever there is a page change.
Could anyone advise on how best to approach this, or if there’s a way to force the component to update correctly upon navigation? Any insights or suggestions would be appreciated.
I hope you’re doing well! I wanted to follow up and check if there’s been any update regarding this issue. Your insights or guidance would be greatly appreciated.
It may because it’s not detecting the page change. This is likely due to how the frontend framework (probably Ember.js, since Discourse uses it) handles component rendering during navigation.
You can add a listener for route changes, something similar to this: