skybrud / Skybrud.Umbraco.Redirects.Import

Import and export addon for Skybrud.Umbraco.Redirects.
MIT License
7 stars 11 forks source link

Refresh/reloads redirects after import #28

Closed bjarnef closed 9 months ago

bjarnef commented 10 months ago

Which version of Skybrud.Umbraco.Redirects.Import are you using? (Please write the exact version, example: 4.0.1)

4.0.1

Which version of Skybrud.Umbraco.Redirects are you using? (Please write the exact version, example: 4.0.15)

4.0.18

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

12.3.3

Bug description

I exported redirects locally from a migrated project on Umbraco 8 -> 10 -> 12 on Umbraco Cloud development environment.

In imported most redirects, but it seemed a bit odd I couldn't click Continue and nothing further happened.

image

however closing overlay and refreshing did show the imported redirects.

It can eventually trigger an event e.g. "Skybrud.Redirects.Import.Something" which the dashboard react on and reload/refresh the redirects table.

abjerner commented 9 months ago

The import package package listens for a skybrud.umbraco.redirects.dashboard.init that is called when the dashboard is loaded. It's this event that is used for adding the import and export buttons to the dashboard.

I've just added and pushed a minor change to the main redirects package so that a dashboard object is passed as part of the event payload. And via 657b5476f9efac737592f59c1043af0de47f39de the import package now uses this to reload the redirects list in the dashboard when the import overlay is closed.

This will be out shortly in v4.0.2 😉