You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was generating some models for a new project and started out with generating ActiveQuery classes for each. I had defined my own ActiveQuery class extending the yii core ActiveQuery class and placed that class in the ActiveQuery Class textbox on the Gii form under the "Generate ActiveQuery" checkbox/section.
After a handful, I decided to no longer wanted the ActiveQuery classes yet. I unchecked the checkbox and deleted the ones I had already created, including my core. When I tried to generate a model after that, the preview button did nothing. It seemed to be dying silently. Finally, I thought it was maybe that ActiveQuery class field. So I checked the checkbox and that form section was revealed; and sure enough, there was an error message below that textbox saying the class was invalid. The error is correct, but it shouldn't matter if the checkbox is unchecked; the class named there isn't being used.
What steps will reproduce the problem?
Access Gii's Model generator
Fill in table name and class name fields properly
Check the "Generate ActiveQuery" checkbox
Type anything invalid into the ActiveQuery class textbox
Uncheck the "Generate ActiveQuery" checkbox
Click the Preview submit button
What is the expected result?
I should get a "list" of the one model class that should be generated with the option to click the "Generate" submit button to actually create the class file.
What do you get instead?
Nothing "seems" to happen. The form reloads as it was when you submitted it with just the option to click the Preview submit button. However, if you Check the "Generate ActiveQuery" checkbox again, you will see a validation error on the ActiveQuery class field.
Additional info
Q
A
Yii version
2.0.26
PHP version
7.3.7
Operating system
Windows 10
The text was updated successfully, but these errors were encountered:
I was generating some models for a new project and started out with generating ActiveQuery classes for each. I had defined my own ActiveQuery class extending the yii core ActiveQuery class and placed that class in the ActiveQuery Class textbox on the Gii form under the "Generate ActiveQuery" checkbox/section.
After a handful, I decided to no longer wanted the ActiveQuery classes yet. I unchecked the checkbox and deleted the ones I had already created, including my core. When I tried to generate a model after that, the preview button did nothing. It seemed to be dying silently. Finally, I thought it was maybe that ActiveQuery class field. So I checked the checkbox and that form section was revealed; and sure enough, there was an error message below that textbox saying the class was invalid. The error is correct, but it shouldn't matter if the checkbox is unchecked; the class named there isn't being used.
What steps will reproduce the problem?
What is the expected result?
I should get a "list" of the one model class that should be generated with the option to click the "Generate" submit button to actually create the class file.
What do you get instead?
Nothing "seems" to happen. The form reloads as it was when you submitted it with just the option to click the Preview submit button. However, if you Check the "Generate ActiveQuery" checkbox again, you will see a validation error on the ActiveQuery class field.
Additional info
The text was updated successfully, but these errors were encountered: