Open linusrogge opened 1 month ago
This issue happens for two reason:
1
https://github.com/getkirby/kirby/blob/4.4.1/panel/src/components/Sections/ModelsSection.vue#L199-L200kirby$pagination$*
local storage.What should we do? Should we also clear localStorage when the session is ended (logged out) or should we always prioritize the defined page
option when the page is first loaded?
I would prefer always landing on the defined page, not only on each new session. At least that’s what this option means to me, judging from the docs. It led to confusion multiple times both for me and clients who use Kirby.
Description
If I use the the
page: 1
option on a sectiontype: pages
, it does not have any effect. No matter if I reload the panel, switch to another page and come back, or log out and in again—the localStorage item (eg.kirby$pagination$/pages/entries/entries
with a value of3
) will be saved and I will land on the page where I previously left off.In the docs, it says “Sets the default page for the pagination. This will overwrite default pagination.” What is the default pagination? Am I understanding this property wrong or does it actually not work?
Looking at the kirby source in
https://github.com/getkirby/kirby/blob/eb47158e91e74184ab291ede020664f1d2829f74/config/sections/pages.php#L12-L24
and also in
https://github.com/getkirby/kirby/blob/eb47158e91e74184ab291ede020664f1d2829f74/config/sections/pages.php#L316-L336
there does not seem to be anything about the
page
option. Or should it be included in thepagination
prop? Also in the Vue Component (and the ModelsSection.vue) there is not a line about this.Expected behavior
The pages section should reset to the given page after a reload, changing pages or logging out and in again. So on each visit, so to say, it should start whatever I set the
page
option to.To reproduce
type: pages
sectionpage
option to1
Your setup
Kirby Version
4.4.1
Your system (please complete the following information)