-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
can't parse_url()
for creating URIs that use pagination logic
#6331
Comments
Summary
Pinging @bastianallgeier @lukasbestle for ideas as you have a better insight on the Http classes, I think. |
Am I correct that this only happens if Kirby's But the underlying bug seems to be in kirby/src/Http/Environment.php Lines 605 to 609 in 6b7ac66
|
Those lines form the Environment class sound like exactly what's needed here as well. |
This sounds kinda familiar. Not sure if it’s really helpful here, but I fixed a similar issue in the library that I use for my HTML minification plugin a while ago. See hexydec/htmldoc#8
Exactly. As noted on php.net regarding
and
|
Description
I've been following the cookbook to setup 'Load More' Functionality with Kirby Pagination.
The model named 'Rewards' is using virtual pages, to fetch the children of the model from an API.
I'm using page cache to cache the content of the page.
During the
function children()
, when I call the children of the model over API, I clear the page cache by usingkirby()->cache('pages')->remove('rewards.html')
in certain conditions.This accessing the page cache is not working once I click the 'Load More' Button, that calls the paginated children from the
rewards.json.php
.Expected behavior
The 'Load More' Button should fetch the children in the same way and display them, as an initial page load should be able to as well.
Actual behaviour
When I use the AJAX 'Load More' Button as outlined in the cookbook, the request fails upon the moment of accessing the page cache.
I've traced it down to
kirby/src/Http/Uri.php:91
, during accessing the page cache, it tries to build a URI, but somehow theparse_url()
function from php can't build a url from the pagination url"/rewards.json/page:2"
that is being sent with the call.I guess because of the colon
:
.Stack trace
To reproduce
parse_url('/rewards.json/page:2')
that is used in the mentioned file-> Is there something wrong with this URI Constructor?
Your setup
Kirby Version
getkirby/cms (4.1.1) composer install
The text was updated successfully, but these errors were encountered: