New Message: Bug in manilaSuite.convertTime

webmaster at userland.com webmaster at userland.com
Wed Feb 1 17:01:09 CST 2006


A new message was posted:

Address: http://manila.userland.com/discuss/msgReader$1598

By: Matt Deatherage (frontier at gcsf.com)

Similar to the previous message: manilaSuite.convertTime can't be called outside of a rendering context, because it unconditionally calls html.getPageTableAddress to try to find time zone preferences. This means you can't call manilaSuite.getPermalinkURL outside of a rendering context, because for home pages, it calls manilaSuite.convertTime.

Suggested fix: wrap the html.getPageTableAddress in manilaSuite.convertTime in a "try" block, and if it gives an error, just return the time that was passed in, just as if there were no time zone preferences. i.e.:

if typeOf (timeZone) == unknownType { //make sure it's really nil and not 0
 if pta == nil {
 try {
 pta = html.getPageTableAddress ()}
 else {
 return (d)}};
 if not defined (pta^.newsSite^.timeZone) { //no time zone prefs for this site
 return (d)};
 timeZone = pta^.newsSite^.timeZone.zone}

This is a Manila site... http://manila.userland.com/.




More information about the Manila-Users mailing list