Menu

#76 error with ns_configsections in the 4.99.12 release (works in previous releases)

Bug
closed-fixed
nobody
4.99.12 (1)
5
2016-11-15
2016-09-02
No

In the 4.99.12 release I notice that the "ns_configsections" doesn't work properly. if you try to use the example code from the naviserver docs, the procedure fails to produce a complete listing.

I found the example code here: http://naviserver.sourceforge.net/n/naviserver/files/ns_config.html#3

according to the docs:
The following example prints out all configuration parameters in all sections of the configuration file.

ns_register_proc GET /config-print {
set config ""
foreach section [ns_configsections] {
append config "section: [ns_set name $section]\n"
foreach {key value} [ns_set array $section] {
append config "$key: $value\n"
}
}
ns_return 200 text/plain $config
}

The above code works perfectly in the 4.99.11 release, but in the 4.99.12 release it only returns one or two configuration options.

If i can give any more information, please let me know!

Discussion

  • gustafn

    gustafn - 2016-09-02

    The bug is acknowledged and fixed by the following commit.
    https://bitbucket.org/naviserver/naviserver/commits/5a3a58296eaec2585bddfba9b27bcb6a4cc5bc39

    it was a consequence of reducing usage of deprecated commands in naviserver. Please test with this fix if possible.

    many thanks for the report.

     
  • Tobel Graves

    Tobel Graves - 2016-09-08

    I tested with the fix, and the ns_configsections command now behaves as expected.

    Thank you very much for your speedy response and update.

     
  • gustafn

    gustafn - 2016-09-09
    • status: open --> closed
     
  • gustafn

    gustafn - 2016-11-15
    • status: closed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB