WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Universal link for Stats opens incorrect site

Open kean opened this issue 1 year ago • 2 comments

Expected behavior

It selected the site from the URL and opens Stats

Actual behavior

It opens Stats for the currently selected site.

Steps to reproduce the behavior

  • Open the following universal link: https://<#domain#>.wordpress.com/stats
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]

kean avatar Sep 16 '24 17:09 kean

Thanks for reporting! 👍

dangermattic avatar Sep 16 '24 17:09 dangermattic

RCA

The action is handled by StatsRoute and the .root case, unlike other cases, doesn't contain the code to select a site from the link.

        switch self {
        case .root:
            if let blog = defaultBlog() {
                coordinator.showStats(for: blog)
            }
        case .site:
            if let blog = blog(from: values) {
                coordinator.showStats(for: blog)
            } else {
                showStatsForDefaultBlog(from: values, with: coordinator)
            }

kean avatar Sep 16 '24 17:09 kean