Hi,
When trying to filter on 'created before' or 'created after' the error message 'This value may not be empty' is always produced and the filtering is halted, even when the date selected is valid. I think you have a typo in _cmf_date_validate() which checks for empty($value) where it should be empty($entered_date). It looks like the validation function has been copied from the one preceding it in the code, and some bits have not been changed. $value does not exist in the date routine so is always going to be empty and thus trigger the error message.

I'll make a patch for this and post it here.

Jonathan

Comments

jonathan1055’s picture

Here's the patch, I made it against the dev release of 28th October. I've just noticed that there is now a dev release dated 10th November but this patch should still apply OK as these functions were not changed, but there will be an offset when patching.

I also added the form item name into the two error messages, so that it is easier to see which one is being displayed when debugging, and it also gives a more informative message to the user.

Jonathan

jonathan1055’s picture

Status: Active » Needs review

Set status to 'needs review'

matason’s picture

Status: Needs review » Fixed

Hi jonathan1055, I came across the same issue whilst using 6.x-2.x-dev and your patch fixed the issue so thanks!

This issue is however fixed in the 6.x-2.0 release so I guess it would be a good idea to update.

jonathan1055’s picture

Status: Fixed » Needs review

Hi Matason,
Thanks for confirming the bug, but I don't quite get your comment, as 2.x-dev is newer that 2.0 so it would not be an 'update' to go back to 2.0.

I've put the status back to 'needs review' because I don't think it is supposed to be marked as fixed until the patch has been committed or discarded as 'wont fix'. If you have tested the patch then you can set the status to 'reviewed and tested by the community' to give the maintainers an indication that it might be ready to commit. Apologies if I'm telling you what you know already :-)

Jonathan

matason’s picture

Status: Needs review » Reviewed & tested by the community

Hi jonathan1055, you're absolutely right, my mistake... I've marked it as "reviewed and tested" :)

irakli’s picture

Status: Reviewed & tested by the community » Fixed
jonathan1055’s picture

Thank you matason and irakli.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.