[wp-trac] [WordPress Trac] #39631: Pagination prepareLinkPreview() Changesets Customizer

WordPress Trac noreply at wordpress.org
Wed Feb 1 18:50:55 UTC 2017


#39631: Pagination prepareLinkPreview() Changesets Customizer
-------------------------------+-----------------------------------------
 Reporter:  nwp_developer      |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Customize          |     Version:  4.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  javascript, administration
-------------------------------+-----------------------------------------

Comment (by nwp_developer):

 It looks like an issue with the '''base''' arg paginate_links(). If you
 have

 {{{#!php
 <?php
 echo paginate_links(array(
     'base'   => get_page_num_link(1) . '%_%',
     'format' => 'page/%#%',
 ));
 }}}

 get_page_num_link(1) returns the base page url and %_% is replaced with
 format. The result is http://mysite.com/blog/page/1/. In customizer the
 changeset url gets injected between blog and page so the url becomes
 http://mysite.com/blog/customize_changesetpage_uuid{etc}/page/1/.

 If I use

 {{{#!php
 <?php
  $big = 999999999;
  $pagination_args = array(
     'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big )
 ) ),
     'format'          => 'page/%#%',
 }}}

 The url doesn't get split by the customizer changeset.

 Replying to [comment:3 westonruter]:
 > @nwp_developer I can't reproduce the issue you are describing. See
 [attachment:working-pagination.mov].

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


More information about the wp-trac mailing list