I think I
may have found a fault in the way extenders are handled:
I have a page with multiple Ditto calls, each displaying a portion of the news item’s content.
However, with Ditto 2.0 using the summary extender, I only get a summary on the first call - the others are all blank.
I looked at the code, and found this in the main snippet:
if (file_exists($extender_path)){
include_once($extender_path);
} else {
The extender file is only included once in the page, no matter how many times the snippet is called, which makes sense to avoid class and function definitions being duplicated, but it has a knock-on, in that the various variable initialisations for the extender are also skipped.
The problem seems to be that the placeholders array is one of these: thus the rendering of [+summary+] is skipped.
The class and function definitions for summary are already protected by being wrapped in _exists conditions, so I tried changing the include_once statement to an include. This seems to work, but I’m not sure of any other spin-off bugs.
Is this the correct solution, and does it need reporting anywhere?