Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field content doesn't show for invalid records #28

Open
vlad-ghita opened this issue Jan 8, 2022 · 2 comments
Open

Field content doesn't show for invalid records #28

vlad-ghita opened this issue Jan 8, 2022 · 2 comments

Comments

@vlad-ghita
Copy link

vlad-ghita commented Jan 8, 2022

Probably same issue as:
bolt/article#38

Reproduce:

  • Have custom ContentValidator returning a dummy ConstraintViolation
    eg: in bolt core source, change src/Validator/ContentValidator.php validate() method to:
    public function validate(Content $content)
    {
        $constraints = $this->getConstraints($content->getContentType());

        $constraints->add(new ConstraintViolation("zzz", null, [], null, null, null));

        return $constraints;
    }
  • Have a Redactor field for a contenttype
  • Open page to create/edit record
  • Populate Redactor field
  • Save record
  • Upon reload, Redactor field value is not displayed.

Example form before save:
form_before_save

Example form after save:
form_after_save

@bobdenotter
Copy link
Member

I'm not sure what's going on here.. What is the intent of that snippet you pasted? What's the expected behaviour?

@vlad-ghita
Copy link
Author

I'm not sure what's going on here.. What is the intent of that snippet you pasted? What's the expected behaviour?

Exactly what it says:
In order to reproduce, "Have custom ContentValidator returning a dummy ConstraintViolation."

And then a small example snippet is provided to accomplish that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants