Fix for bug #280 -- searches using subelement_key_name parameter now only return current versions #38

wants to merge 1 commit into from

3 participants


Hi everybody,

This bug affects searches for stories and media using the subelement_key_name parameter.

At the moment, documents that contained a subelement in a previous version, but do not contain it in the current one, are returned incorrectly in a search.

This patch just adds a check to be sure the subelement records are active.

Thanks so much,


Bricolage Developers member

Hrm. Those TRUEs shouldn't be in there; I don't believe they'll work on MySQL, will they? I think you can use '1'.


Double hm. There are existing TRUEs for the subelement_id parameter, so probably both subelement_key_name and subelement_id searches have been broken for MySQL for a while.

But! MySQL booleans seem a little better than they used to:

I'll install MySQL and see how it copes in real life, but it looks promising.

Bricolage Developers member

OK, I've tried the whole thing with MySQL and the verdict is in: True and False work just fine, and so do TRUE and FALSE and true and false.

Greg, you are going to loooooove the test. One day.

Bricolage Developers member

So, no need for this change, @bretdawson?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment