orchidsoftware / orchidsoftware/platform

Empty repository in Listener after validation error

Open
#2,810 0 comments 0 reactions 1 assignee View on GitHub

@tabuna is already working on this.

Since Mar 2, 2024.

Errors
Dominant language
PHP
Stars
4.8k
Forks
662
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Describe the bug
Content of repository in Listener ($this->query) is empty after triggered validation error.

To Reproduce
Steps to reproduce the behavior:

  1. Add SubtractListener from Documentation
  2. Add simple Screen with SubtractListener and additional method save
public function save(Request $request): void
{
        $request->validate([
            'anyField' => 'required',
        ]);
}
  1. Add value for minuend and subtrahend fields.
  2. Field result is displayed with value
  3. Save form without anyField value (for trigger error from validation)
  4. See page with validation error, with values in fields minuend and subtrahend, but field result is not displayed. Because this field is displayed when $this->query->has('result'), but no value in repository.

Expected behavior
Repository in Listener ($this-query) contents actual data (then field result is displayed after trigger validation error)

Screenshots
Step 4
image
Step 6
image

Server (please complete the following information):

  • Platfrom Version: 14.19.0
  • Laravel Version: 10.46.0
  • PHP Version: 8.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.