Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Reader: Custom excerpts are not shown on the website version #64563

Open devNigel opened 2 years ago

devNigel commented 2 years ago

Quick summary

The custom excerpts are not showing on the WordPress.com Reader website version. However, on the mobile app, the custom excerpts are shown. I was able to reproduce this issue with multiple blogs.

Steps to reproduce

  1. Create a post on a new Simple or AT site.
  2. Make sure to set a custom excerpt.
  3. Check the WordPress.com Reader feed here: https://wordpress.com/read
  4. Check the Reader feed on the mobile app.
  5. You will observe that custom excerpts are showing on the mobile app, but not of the Reader website version.

What you expected to happen

The custom excerpts should be shown on the Reader website version.

What actually happened

The Reader website version is not showing the custom excerpt.

Website version:

image

Mobile app:

image

Context

User report: 5278201-zd-woothemes

Please update the user via email once the bug is fixed.

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

No

Browser, operating system and other notes

Google Chrome 103.0.5060.53 WordPress Android version 20 ( 1231 )

Reproducibility

Consistent

Severity

All

Available workarounds?

No response

Workaround details

No workaround.

supernovia commented 2 years ago

📌 HOUSEKEEPING

📌 SCRUBBING

📌 FINDINGS/SCREENSHOTS/VIDEO

The web version of the reader does not show the correct excerpts on any of the sites I tested.

The app version shows the correct excerpt only on my simple site. @devNigel can you confirm that's what you're seeing currently, and do you know whether anyone's worked on this?

App Web
IMG_4384 IMG_4385

📌 ACTIONS

📌 Message to Author

devNigel commented 2 years ago

@supernovia On my end, on AT sites, the custom except is showing on the app but not on the website. I tested it on the WordPress.com Android app.

Here's a screenshot:

WordPress.com Android App:

image

Reader Website:

image

For both Simple and AT sites, the custom excerpt is showing the Android app but not on Reader website. I have added the browser and app details on the bug report.

vinnykaur commented 2 years ago

Another one: zd-5635973

github-actions[bot] commented 2 years ago

Support References

This comment is automatically generated. Please do not edit it.

hacchism commented 1 year ago

Another one: zd-5724777 The user wants to be informed once the bug is fixed.

roo2 commented 1 year ago

I investigated this and the page gets posts from

https://public-api.wordpress.com/rest/v1.2/read/feed/$feed_id/posts

But the posts returned by this endpoint do not actually contain the post_excerpt they contain another excerpt field that has already been seemingly replaced with the post content.

I don't see why we can't update the endpoint to include the actual excerpt and then update the reader to use it.

roo2 commented 1 year ago

Actually I tracked down a discussion and we deliberately chose to always use the post content in the stream for wpcom sites. The rationale was that quite a few users were actually using the excerpt field to make excerpt only blog posts, and almost using their blogs like twitter accounts.

It sounds strange, I'm not sure if I'm understanding it correctly, but in 2016 we made the decision to always use post content in the feed. p5PDj3-1wD-p2

roo2 commented 1 year ago

ok, after reading p5PDj3-1wD-p2 some more, I belive the intent was to prevent users from making "excerpt only" posts. I think that removing user written excerpts from the reader entirely was an intentended consequence.

Another technical note, it seems that jetpack and wpcom sites have different code paths handling them and actually use different object types to represent the post internally on the back end.

roo2 commented 1 year ago

Looking at the backend implementation, we get wpcom posts from the feedbag_item_data table, but this table does not contain the post_excerpt. We can either make a call to get_post to load the full post for every post displayed, but I believe this could dramatically impact performance, or we can update feedbag_item_data to include the post_excerpt.

feedbag_item_data is added to the DB here 2f12f-pb/ feedbag_item_data is converted to a post for display here and here 2f130-pb/

There's also caching involved which may make it tricky to test.