unionco/calendarize

"Could not save field."

Closed this issue · 4 comments

Getting "Could not save field." without any error message under any inputs when creating/editing existing calendarize-fields after latest plugin update. Can't find anything in the error logs either.

@havardlj - it should not be failing silently. The new custom validator only fires on three specific cases.

  • If there is a start date there must also be an end date
  • If there is a start date it must not be less than the start date
  • If the event repeats and repeat ends on a specific date, the End On Date field must be filled

You can take a look here CalendarizeValidator.php

Could you share what your calendarize field looks like?

It fails before getting to any of those steps
https://imgur.com/a/PseBmZ6

I ran into this as well. This is the place where it fails: https://github.com/craftcms/cms/blob/master/src/services/Fields.php#L755

When I commented the return false; as an experiment to see if anything breaks the field is saved and seems to work fine.

I do not know much about these validators and I can't seem to figure out which specific validator fails, but maybe it helps to know it's the validator anyway.

Just pushed a fix for this. The validation rules were in the incorrect place. I am currently working on adding better unit testing to this plugin to avoid these issues in the future.