- Issue created by @Mav_fly
- 🇧🇪Belgium Mav_fly
I did some more tests and saw that also the problem exist with authenticatd users.
The status is only updated after clearing the cache. - 🇳🇱Netherlands johnv
OK, I was surprised, since the new version explicitly addressed the caching.
Please uncheck the caching in your view. It is hidden under the 'Advanced' section in the third column of the View configuration screen. - Status changed to Active
9 months ago 12:27pm 5 April 2024 - 🇳🇱Netherlands johnv
changing to a normal bug. Also, 'Needs work' is only to be used if a patch is applied an reviewed.
- 🇧🇪Belgium Mav_fly
@johnv I followed your advice and uncheck “caching” in my view (see the attachment).
And did some more research as result :- When you visit the website form a new browser the status is correct.
- When you already visited the website and open the website in a new tab without closing your browser, or refresh the page then the status is incorrect.
This is for anonymous users.
- When you visited the website as authenticated user and you refresh the page or open the website in a new tab the status is correct.
- After clearing the cache the status is for everyone correct authenticated and anonymous user - 🇳🇱Netherlands johnv
Please check if the patch from 🐛 Views filter 'current open/closed status' does not work Needs review helps.
- 🇧🇪Belgium Mav_fly
I tried the patch #6 but it didn't solved my problem.
I saw also that it failed for "PHP 8.1 & MySQL 5.7, D10.2.1 Patch Failed to Apply".And our configuration is :
D10.2.4
PHP 8.2.16 - 🇳🇱Netherlands johnv
You state that the problem is in views.
Let's verify your basic behaviour. Please test with a normal entity page view with the formatter setting 'Current status/Current status position' set to before or after the hours.
Both for anonymous and authenticated users. - 🇧🇪Belgium Mav_fly
As you asked I made a normal entity page view with the formatter setting 'Current status/Current status position' set to before or after the hours.
In attachement you the results after refreshing the page when the customer was closed. - 🇳🇱Netherlands johnv
Hmm, it seems there is a problem with public function getNextDay(int $time), which receives a Unix timestamp, and calls $status = $item->getStatus($time), that expects a HHMM time.
- 🇳🇱Netherlands johnv
Please test the new -dev version and report back.
The problem was that the Season~isInRange() function was not correct. Therefor, the time wat replaced by a date early in the process, corrupting the isOpen() status. - Status changed to Needs review
8 months ago 6:01pm 17 April 2024 - 🇧🇪Belgium Mav_fly
Is it correct that today 19/4 there is a new release of the dev version ?
- 🇳🇱Netherlands johnv
Indeed, but please do not use it . I am in the middle of a development.
- 🇧🇪Belgium Mav_fly
Ok but we have now installed the dev version of 19/4 but leave it now like that until you give further instructions.
- 🇧🇪Belgium Mav_fly
We updated to the latest dev version (see attachment) but the problem isn't solved.
- 🇮🇳India aman1248
Hello @johnv, the latest development version does not have such an error; it's working absolutely fine on my project.
- 🇮🇳India aman1248
"@Mav_fly, could you please provide detailed steps to reproduce the error that's occurring on your end?"
- 🇧🇪Belgium Mav_fly
@Amandeep123 how to reproduce :
- We made a new content type “contact”
- In this content type we made a field “opening hours “ from office hours, in which we put the hours of our customer.
- Create a view block from fields content type “opening hours” where we get the field office hours.
Specifications block
Format of the field office hours --> “Status”
Caching --> “no”
- And then put this block in the leaderboard. - 🇮🇳India aman1248
Hy @Mav_fly , I followed the step to reproduce the error and encounter the same error that you are facing .
- 🇧🇪Belgium Mav_fly
Hi, Amandeep123 thanks for the feedback!
@johnv, you have any idea what the problem problem could be ?
- 🇳🇱Netherlands johnv
@Mav_fly, no I don't,
I can test again. I have a test system with only Drupal, and the 2 standard caching modules (for authenticated and anonymous users - the latter gives me many headaches)Do you have any other caching services in place, like Varnish or 'reverse proxy'?
- 🇳🇱Netherlands johnv
The caching time was calculated incorrectly. Please test dev version.
- Status changed to Fixed
7 months ago 2:47pm 31 May 2024 - 🇳🇱Netherlands johnv
A fix was committed in 🐛 Views filter 'current open/closed status' does not work Needs review . There is still a problem with caching for anonymous users. please disable the view's caching.
- Status changed to Active
7 months ago 2:52pm 31 May 2024 - 🇳🇱Netherlands johnv
Hmm, disabling the cache does not help refreshing for anonymous users. Perhaps filtering must move from _pre_render to _post_render.
- 🇧🇪Belgium Mav_fly
@johnv we installed the latest dev version as asked, but the problem stil exist :(
@Amandeep123 Did you test already the lastest dev version ?
- 🇧🇪Belgium Mav_fly
There have already been new developments for this issue ?
Because I still have this problems in one of my projects.Thanks in advance
- 🇳🇱Netherlands johnv
No, maintainer is out of options to resolve this problem.