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

Strip path suffix from pagenum links to fix the posts pagination #5862

Merged
merged 3 commits into from
Feb 10, 2021

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Feb 6, 2021

Summary

Fixes #5861

Checklist

  • Add tests.
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@westonruter westonruter added this to the v2.1 milestone Feb 6, 2021
@westonruter
Copy link
Member Author

@milindmore22 Would you test this to confirm it is fixing the issue you reported?

@codecov
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #5862 (ed6d973) into develop (3f6b836) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #5862      +/-   ##
=============================================
+ Coverage      75.15%   75.18%   +0.03%     
- Complexity      5657     5663       +6     
=============================================
  Files            210      210              
  Lines          16987    17009      +22     
=============================================
+ Hits           12766    12788      +22     
  Misses          4221     4221              
Flag Coverage Δ Complexity Δ
javascript 75.93% <ø> (ø) 0.00 <ø> (ø)
php 75.15% <100.00%> (+0.03%) 0.00 <5.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
src/PairedRouting.php 96.30% <100.00%> (+0.29%) 117.00 <5.00> (+6.00)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2021

Plugin builds for c467d11 are ready 🛎️!

Copy link
Collaborator

@milindmore22 milindmore22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, confirmed issue has been resolved.

@westonruter
Copy link
Member Author

@pierlon Ready for review.

Copy link
Contributor

@pierlon pierlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, one quick question though.

$this->assertFalse( has_action( 'wp_head', 'amp_add_amphtml_link' ) );
$this->assertEquals( $using_path_suffix, $this->instance->is_using_path_suffix() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check was already done on line 463. Is it necessary once more?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no. It was redundant. Removed in c467d11.

Copy link
Contributor

@pierlon pierlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done 👌.

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

Successfully merging this pull request may close these issues.

Path suffix paired URL structure fails with paginate_links()
3 participants