[wp-trac] [WordPress Trac] #59504: 'excerpt_length' filter in hijacked for ajax requests

WordPress Trac noreply at wordpress.org
Fri Sep 29 17:13:06 UTC 2023


#59504: 'excerpt_length' filter in hijacked for ajax requests
--------------------------+-----------------------------
 Reporter:  perrelet      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.3.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 {{{
 wp-include/blocks/post-excerpt.php:86
 }}}

 The file hooks 'excerpt_length' with a value of 100 and priority of
 PHP_INT_MAX for admin and rest requests. As a result, 'excerpt_length' is
 set to 100 for ajax requests (is_admin() is true for these)

 Presumably this is incorrect. If a post is being rendered via ajax, it's
 excerpt length shouldn't be hijacked by block logic.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59504>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list