[opencms-dev] Contentload problem?
DI Gunther Schmidl
schmidl at webdynamite.com
Wed May 10 10:28:49 CEST 2006
Hello list,
I think there's a problem with the contentload collector. Consider the
following code:
<% int jobCount = 0; %>
<cms:contentload collector="allInFolderDateReleasedDesc"
param="/jobs/job_${number}.html|123" editable="true">
<% jobCount++; %>
</cms:contentload>
<%= jobCount %>
This will result in '1' being printed even if there is not a single file of
type 123 in the directory (or indeed any file at all) -- the contentload
runs erroneously. This means, in turn, that adding a contentcheck inside the
contentload will result in a NullPointerException when there is no file, or
no matching file, in the folder:
<cms:contentload collector="allInFolderDateReleasedDesc"
param="/jobs/job_${number}.html|123" editable="true">
<cms:contentcheck ifexists="WorkHours">
Hi
</cms:contentcheck>
</cms:contentload>
I don't remember this problem from 6.0.x, so I'm wondering whether this is a
newly-introduced bug, or different functionality -- in any case, it prevents
my application from working correctly.
Any help with this issue is highly welcome.
Thanks,
-- Gunther
More information about the opencms-dev
mailing list