Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader: changes made to the Site Title, Tagline, and Site Icon are not reflected in the site stream header #14629

Open
designsimply opened this issue Aug 12, 2020 · 5 comments

Comments

@designsimply
Copy link
Contributor

Steps to reproduce:

  1. Subscribe to and view a site you own in the Reader.
  2. Go to My Site, tap the Site Icon in the header, and change the image.
  3. Go to My Site, tap the Site Title in the header, and change the text.
  4. Go to My Site > Tagline, and add a very long tagline.
  5. Go back to the Reader and view the site there again.
  6. Pull to refresh.

Result: changes made to the Site Title, Tagline, and Site Icon are not reflected in the Reader site header. (1m43s, 1m4s)

IMG_4490 IMG_4491 IMG_4493

Tested with WPiOS 15.5.0.0 TestFlight beta on iPhone 11 iOS 13.6.

Can the cache for Site Title, Tagline, and Site Icon in the Reader header be updated when you pull to refresh?

@designsimply
Copy link
Contributor Author

Here are some additional views in light/dark mode and in portrait/landscape orientation.

IMG_4499 IMG_4500 IMG_4498

IMG_0516 IMG_0517 IMG_0518 IMG_0519

Tested with WPiOS 15.5.0.0 TestFlight beta on iPhone 11 iOS 13.6 and iPad Mini 4 (WiFi) (iPad5,1) iPadOS 13.6.

@yaelirub
Copy link
Contributor

Thanks for reporting @designsimply !

Hey @leandroalonso , got a CoreData question for you:

[step 1] When a user changes their site settings (title, tagline, icon etc’), we call:

- (void)updateSettingsForBlog:(Blog *)blog

That makes the updates and saves to the context.

[step 2] When we’re fetching a site topic in ReaderStreamController, we call siteTopicForSiteWithID in ReaderTopicService which calls:

- (ReaderSiteTopic *)findSiteTopicWithSiteID:(NSNumber *)siteID
who uses a fetchRequest to get the topic from the main context but the fetch result doesn’t include the updates that were saved in [step 1].

What could be the reason for that? In my testing I found that the context in both is the same and that if I fetch the data for the site topic from the remote service, I do get the update so that's why I assume there's a context saving issue here.

@leandroalonso
Copy link
Contributor

leandroalonso commented Aug 17, 2020

@yaelirub I guess this is not a Core Data issue.

When you tap to see a Blog's content controllerWithSiteID is called.

Then, siteTopicForSiteWithID in ReaderTopicService is called.

The problem is: once a topic is created for a blog, it never gets updated. Basically, it creates with the data it has and that's it.

I think we can either update the topic each time it's requested or grab the blog details from the first available post.

To correctly fix this, the posts should all refer to the same blog entity. But I'm afraid this would be disproportionally complex for a simple bugfix like this — we can still patch it though.

@yaelirub
Copy link
Contributor

Thanks for looking into this, @leandroalonso !
@designsimply , as it is an edge case, I'm moving this issue to Groundskeeping.

@dangermattic
Copy link
Collaborator

Thanks for reporting! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants