[wp-trac] [WordPress Trac] #59043: the_excerpt() function return excerpt with different length in page load and ajax request on WordPress 6.3

WordPress Trac noreply at wordpress.org
Fri Aug 11 08:13:45 UTC 2023


#59043: the_excerpt() function return excerpt with different length in page load
and ajax request on WordPress 6.3
-------------------------------------------------+-------------------------
 Reporter:  sarathlal                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  6.3.1
Component:  Editor                               |     Version:  6.3
 Severity:  major                                |  Resolution:
 Keywords:  needs-testing needs-testing-info     |     Focuses:
  needs-patch                                    |
-------------------------------------------------+-------------------------
Changes (by swissspidy):

 * component:  Posts, Post Types => Editor


Comment:

 > The given patch is not the correct way to fix it. It works technically,
 but only through accidental means.

 Agreed. It only works because `is_admin()` and `REST_REQUEST` are never
 both true at the same time, so the filter will never ever be applied.

 In any case, this needs to be fixed in Gutenberg as the source of truth is
 there:
 Also, any changes to this file need to be done in Gutenberg:
 https://github.com/WordPress/gutenberg/blob/d5d8533cf2cc04bb005bda147114cf00782d6c38/packages
 /block-library/src/post-excerpt/index.php#L80-L95

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59043#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list