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

HasMany: Update > valdiation error Message > update again >The object being updated is outdated. #174

Open
strtob opened this issue Nov 15, 2021 · 1 comment

Comments

@strtob
Copy link

strtob commented Nov 15, 2021

Hi,

This extensions make yii great for me! Complement!

I've got just one thing, which propaberly not working correctly:

  • I've generated CRUD with hasMany Forms as TabularForm
  • If I make an update and got an validation error due to not matching some rules, e.g. forgot to fill a required field, a error hint is shown (this is fine)
  • Now I correct the the mistake and fill the required field and update again I got the error: The object being updated is outdated.

It seems that some forms will not be field with the lock id correctly after the first update and have then an outdated id.

Does anyone have an idea, how to correct this???

Many thanks in advance!!!

Toby

@strtob
Copy link
Author

strtob commented Nov 15, 2021

Hi again,

ok, I found out that the "normal" form don't send an submit, if not all rules are fulfilled.

Unfortunately, if an has many form (as tabular form) don't fulfill all rules, the page will be submitted and the flash message shows the validation error. As long as the validation error will not prevent the submit - it doesn't work.

So, how can I bring the form to prevent the submit, if hasmanyforms validation rules are not fulfilled?

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

1 participant