Bug 32020

Summary: Expired pages are still accessible
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15326    
Bug Blocks:    

Description Caroline Cyr La Rose 2022-10-27 16:32:04 UTC
When creating a new page with the additional content page, there is a possibility of adding an 'expiration date' to the page, presumably for when the content of the page is not valid anymore. However, the link to that page is still valid after the page has expired. I wonder if the link should return an error page or 404 page or something like that.

To test:
1. Go to Tools > Pages > New entry
2. Create a page with no expiry date
4. Access the link to the page in another tab
5. Click 'Edit' next to the page entry
6. Add an expiry date in the past to the entry
   --> It disappears from the list of pages 
7. In the other tab, refresh the page
   --> It is still accessible
Comment 1 Caroline Cyr La Rose 2022-10-27 21:04:08 UTC
There is already a message for a page that doesn't exist. It is triggered when trying to access a page limited to another library.

For example:
1. Go to Tools > Pages > New entry
2. Create a page for a library you are not logged in at (e.g. Franklin if you are connected at Centerville)
3. Click the link generated for either OPAC of staff
   --> Error message "This page does not exist"

I think the same process should be used for expired pages.
Comment 2 Caroline Cyr La Rose 2022-10-27 21:12:49 UTC
I also noticed that the publication date doesn't affect the access either. I'm not sure if it should be a different bug or if this bug can cover both cases.

To test:
1. Go to Tools > Pages > New entry
2. Create a page with no expiry date
4. Access the link to the page in another tab
5. Click 'Edit' next to the page entry
6. Add a publication date in the future to the entry
7. In the other tab, refresh the page
   --> It is still accessible