Closed (fixed)
Project:
Office Hours
Version:
7.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Feb 2010 at 02:30 UTC
Updated:
31 May 2024 at 14:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnvAdding this to the generic issue #696262: Show Status 'Open/Closed (now/today/soon)' in Views
Comment #2
johnvRe-opening this issue, since the issue mentioned in #1 refers to 'showing' not 'selecting' the status.
Latest -dev version contains Views 3 support.
The 2 Filter-handlers in the /includes directory are not converted yet, and should be able to perform this task.
(ATM they are disabled by commenting the out in the .info file.)
Patches are welcome.
Comment #3
johnvSee also #1945368: Integrate with Search API / Apache Solr
Comment #4
adelka commentedsubscribe
Comment #5
alayham commentedI am achieving "now open" filter in views using a views_php filter with the following code
If you use minutes, you need to add them to the code.
Comment #6
FuXXz commentedAny plans to implement an open now / closed now Exposed filter in views?
Or is there a other way to get this function? Can the result from the views_php module exposed? Or can any other moudel read it? Maybe Rules? So is it possible to unpublish or fill a other field if the views_php filter return false?
Comment #7
johnvThis commit adds a filter with options: closed/open now/open today.
Comment #8
FuXXz commentedThank you for the commit.
If i try to add filter i get an Ajax error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: ../admin/structure/views/ajax/add-item/navigation/default/filter
StatusText: Internal Server Error
ResponseText:
In addition there is an error in the log:
Notice: Undefined index: aliases in office_hours_field_views_data_alter() (Zeile 22 von ../sites/all/modules/office_hours/office_hours.views.inc).
Comment #10
johnvAbove commit is a new try.
Comment #11
FuXXz commentedThis johnv is awesome.
It works better, i can add the filter now but it can only filter the "open" nodes.
The closed dont work.
Bothe Filter display Error:
Notice: Undefined index: und in office_hours_handler_filter_open->post_execute() (line 115 of .../sites/all/modules/office_hours/includes/office_hours_handler_filter_open.inc).
Warning: Invalid argument supplied for foreach() in office_hours_handler_filter_open->post_execute() (line 115 of .../sites/all/modules/office_hours/includes/office_hours_handler_filter_open.inc).
Notice: Undefined index: und in office_hours_handler_filter_open->post_execute() (line 115 of .../sites/all/modules/office_hours/includes/office_hours_handler_filter_open.inc).
Warning: Invalid argument supplied for foreach() in office_hours_handler_filter_open->post_execute() (line 115 of .../sites/all/modules/office_hours/includes/office_hours_handler_filter_open.inc).
Comment #12
johnvYeah, the current version is very basic:
- you must use nodes. Not other entites, not revisions.
- you must not translate the field (hence the 'und') Please check the database which language you use. Do you use translation? Content Translation? Entity Translation?
I'll see what I can do. Please answer the above questions.
Comment #13
FuXXz commentedI installed the module and did no translation to it, but i use german language in the frontend. English for backend / Admin.
The vies show only node.
But i can't follow you which language my database is, where should i look ?
Now i deactivated locale module, deinstall it, reinstall office hours, create new contenttype, new office hour field, created a new view for nodes only. Now there is no error.
BUT the closed nodes still not visible if the filter is selected.
Comment #15
johnvTry the next update. It fixes the language problem and the selection problem.
Comment #16
johnvComment #17
FuXXz commentedSame Error, closed nodes not displayed. I will trie again a fresh Drupal
Comment #18
johnvREmoving and re-adding the filter from your view might help (save inbetween)
Comment #19
FuXXz commentedNo Change :( Same Error and behavior with 7.x-1.3+16-dev
Comment #20
FuXXz commented7.x-1.3+17-dev works. I will try with locale and l10update etc.
Comment #22
sunil khan commentedHello guys,
I have a problem
i have created new content type for tenders with following fields:
Title,
Files,
start date,
close date,
status ( open/close)
In view i want to apply following filter.
Between open and close date status will be open and i want to change status to close at closing date.
Comment #23
Kanat Ospanov commentedHi,
Exposed filter does not work with open now \ closed now.
Drupal 7.64 Office hours 1.8
I see readme.txt, when will it be possible?
Comment #24
johnvThis is now working in D8 version, dev or upcoming 8.x-1.18
Comment #25
johnv