Regarding the 'dirty' criteria, what I was finding was the following.
Say on step 1, passing
resulted in having
Then when step 2 executes in
, the line
$criteria = $this-><em>criteria;</em>
is executed to reinitialise
with the base feed criteria. But after coming out of
on step 2,
would end up with the merged value of step 1 _and step 2 which is not what is expected (e.g.
$criteria->relatedTo = ['and', [21, 37]]
). This would mean the feed element matching would fail later in the process step.
Not 100% certain, but the same might have been happening with simple criteria elements too (e.g.
). Please test. If not then it might be something to do with my
criteria adding in
I'm sure the problem has got something to do with PHP variables by reference etc as
is getting passed by reference into a few methods in the step processing. In fact, it might even be that
is getting 'dirty', rather than
(which is being assigned its value on each step).
In the end, I found that changing
$criteria = $this->_criteria;
$criteria = clone $this->_criteria;
fixed the problem. This resulted in the start of each step having
correctly re-initialised with just the base feed criteria before going into
Perhaps do some testing and see if you are getting the same results.