Quote from: sottwell at Apr 05, 2006, 04:08 PM
If the Unix timestamp is in the page output at all, it should make no difference whatsoever if it’s in a comment and thus not displayed by the browser. That’s purely a browser issue. I suspect there is something else at work here.
I’m pretty confident that the issue is rendering here, and if it is, I would agree with Ryan that it’s a bug. Here is how I tested it:
- I ensured that the unixtime stored in the DB was correct for the current date set for the event
- I ensured that the tv with the unixtime in it was being rendered into the NL chunk
- I ensured that the sort tv was the unixtime one
I then loaded the page where the NL is called, and confirmed that the correct sort happened.
I then altered the date of one show, and observed via phpmysql that the value changed in the unixtime tv (in other words, the EVAL that writes the new value had happened.
- I altered the chunk so that the sort tv would not be called
- I then reloaded the page where the NL is called
- the same sort order as before the date/unixtime change was observed. Reloading several times did not alter the order
- I then altered the NL chunk, so that the tv would render into the page
- on reloading the NL page, the correct sort order was observed.
So, it does seem to be the case that when sorting, if the sort tv is not found in the chunk used to render the item, it fails, or uses a different, default sort.
If there is anything else at work, then I’d be interested in knowing what it is. Perhaps a cacheing issue within modx? are TV values persistent in any way? IE could it be the case that when the TV is not rendered, then MODx has no occasion to re-evaluate its value against a cached one, so it uses the old sort order? As I mentioned, the sort order seems to persist. That is, when an unrendered change takes place, the sort reflects the sort order the last time it did render...
Ideas?