Postponed (maintainer needs more info)
Project:
Views Table Highlighter
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2010 at 18:45 UTC
Updated:
14 Mar 2012 at 17:45 UTC
Comments
Comment #1
smokrisYou've almost got it.
Right now your code is comparing two strings --- an ISO representation of the datefield value, and the literal string "now +6 months". To PHP this is by default just an undifferentiated string.
You can use the PHP
strtotime()function to convert both the datefield value and the "now +6 months" relative date specifier into numeric time representations, which PHP can then sensibly compare.Try this:
Comment #2
Argus commentedThis works fine indeed (thanks!), but unfortunatly only in the Live Preview. Once I save the view it returns all rows red.
This may be another issue though for I also noticed the same happening on another occasion. FYI I have the module working fine in yet another view.
Comment #3
smokrisClosing inactive support request.
Comment #4
lunk rat commentedI used this same snippet and I also have the problem that it works great only in live preview, and only on the "Defaults" preview. When I preview the "Page", highlighting does not appear. There is no highlighting at all on the actual view, once the view is saved.
I also have highlighting working in a dozen other views on the same site. But with this particular date highlighting, I can only get it to work in the Defaults live preview in views UI.
Comment #5
smokrisHmm. I just created a test site, added a "Date" field to a content type, added a couple sample nodes, and created a view using the above snippet. Highlighting works for me both in preview and on the actual View page.
@LunkRat: please export your Content Type and your View (using Features), and attach the module to this issue, so I can try to recreate your exact scenario. (Or provide a set of instructions for reproducing this issue from a clean test site.)