I just installed Static Pages.
The first time I run the filesystem scan for static pages, after restarting nsd, I get an error that
nsv array 'sp_sync_cr_fs_times' does not exist!
.
If I run this a second time (without restarting nsd) then it works fine. However, if I restart nsd, the first time I run the filesystem scan, I get the same behavior.
Looking at the use of sp_sync_cr_fs_times in static-pages-init.tcl and static-pages-procs.tcl, it seems related to the testing for existence of the nsv_array itself.
I wrote a very simple test of this and found some weird results. I am very new to tcl and aolserver. Am I misunderstanding the basic use of the nsv_array exists
function? Here is how I tried to verify existence of an nsv_array:
set nsv {tmmsp_sync_cr_fs_times}ns_write "FOO-TMM.tcl declared tmmsp_sync_cr_fs_times.
"
nsv_unset $nsv
ns_write "FOO-TMM.tcl SET array $nsv.
"
nsv_array set $nsv [list]
if { ![nsv_array exists $nsv] } {
ns_write "FOO-TMM.tcl nsv_array $nsv does NOT exist.
"
} else {
ns_write "FOO-TMM.tcl nsv_array $nsv DOES exist.
"
}
ns_write "FOO-TMM.tcl SET KEY for array $nsv.
"
nsv_set $nsv foo 1
if { ![nsv_array exists $nsv] } {
ns_write "FOO-TMM.tcl nsv_array $nsv does NOT exist.
"
} else {
ns_write "FOO-TMM.tcl nsv_array $nsv DOES exist.
"
}
Anyway, it appears to me that the nsv_array doesn't appear to exist until a key is set in the array itself??