To reproduce:
Create two schedules, give one at least one program, leave the other blank.
Create a view, built on nodes.
Filter by node type = Schedule, Station schedule = Has scheduled programs
Add node title as a field
Expected result:
Title of the schedule with programs
Actual result:
Nothing
Supposed cause:
station_schedule_handler_filter_schedule_item.inc is whack
It is used for both "Station schedule=Has scheduled programs" and "Station Program=Is scheduled"
hardcorded for station programs
Solution:
create another handler?
fix this one?
The reason I came across this was because it had the whole (empty($this->value) ? '=' : '<>') . " 0" that I reused in #757408: Add views filter for "Is default schedule".
Also, I'm really really confused about the views base_table and real_field and building views on station_schedule_item vs building on nodes and using relationships and I'm not sure how to fix any of this.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | station-844052-6.patch | 3.77 KB | tim.plunkett |
| #2 | station-844052-2.patch | 2.27 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettThis is my other priority for a stable release.
Comment #2
tim.plunkettFirst thing was removing the redundant
empty().The other was switching the "real field" for the calls to
station_schedule_handler_filter_schedule_item. Instead of (wrongly) hardcodingssi.program_nid, I think it would make more sense to hardcode$this->table_alias.nid, that way the handler can be used for both "Is Scheduled" and "Has scheduled programs".In addition to the "steps to reproduce" in the OP, to test the other situation:
Expected result: Title of the program on the schedule
Comment #3
drewish commentedah yeah that seems like a good approach. haven't had a chance to test it though. if you're comfortable with it commit away.
Comment #4
tim.plunkettWell I botched my commit message, but it's been committed to HEAD.
I'll tag a beta release later tonight, I think.
Comment #5
tim.plunkettI really did not have a smooth commit experience today. I accidentally also committed several small coding style fixes, sorry. Won't happen again!
Comment #6
tim.plunkettFor reference purposes, this was the coding style patch I somehow managed to accidentally commit.
Comment #7
drewish commentedThey all look good to me.