Skip to content
Snippets Groups Projects

Hotfix/blog article validation

Merged Robert Sinton requested to merge hotfix/blog_article_validation into master

Blog articles could not be saved because of a 500 error. POST only — PUT was OK.

Traced to a recent validation-related change in the blog API controller, which seems to be about ensuring that no article fields are the same as the URL title?

This change did not play nicely with the categories field (set of checkboxes) because it supplied an array as its value rather than a string, and the validation library's is_unique() method couldn't cope with that.

As I wasn't sure exactly what the intent was of the validation change, I just did a quick fix by eliminating categories from consideration for that rule. Probably needs further attention.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply