Hi,
I've found a strange behavior while developing a plugin. To test the problem in an easily reproducible way, I've used the sample plugin "now", from
http://www.dokuwiki.org/devel:syntax_plugins#sample_plugin_1_-_now
Adding these lines within the plugin's render function,
// debug: how many times is this function running?
$fp = fopen('/tmp/dokuwiki-plugin-now.log', 'a');
fwrite($fp, date("H:i:s") . " -- syntax-render\n");
fclose($fp);
I've found that each time I visit a page that uses "[NOW]", at least
two entries are added to the log. BTW, the syntax that is firing the plugin (in the example, the string "[NOW]") is occuring only once in the page.
But that's not all: With the plugin I'm developing, I've seen up to
seven runs of render for each single page visit! Since my plugin's render function fetches content from another server, you may understand why I'd prefer that it runs
only once ;-)
What's happening here?
Thanks in advance for your help.