https://gyazo.com/61dd0762032221da5c277a73f8679f45
https://gyazo.com/1a2f3005425e1d6cabaacd8052aa877f
There are 2 small issues in those gifs, first when you're in a popup and some error happens, it also shows in the back (behind the popup), in this case the problem is the image being to big, but is not the first time I see it.
Also the "Field Image cannot be empty" isn't that descriptive for a max bytes restriction.
Generate a simple entity, with an image field, with a max bytes size restriction and try to upload a bigger size image.
freshly generated app, JHipster 4.5.2
java version "1.8.0_131"
node: v6.10.3
npm: 4.2.0
yeoman: 1.8.5
yarn: 0.24.6
macOS, Chrome browser
I can take this issue
You are still not following the guidelines. We need your yo-rc.json and entity.json. can you plz run jhipster info on your app and post the results
~~~json
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.xxx.xxx",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.5.2",
"baseName": "xxx",
"packageName": "com.xxx.xxx",
"packageFolder": "com/xxx/xxx",
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": true,
"rememberMeKey": "506073c2654996412640f902f76e6c270b46a403",
"clientFramework": "angular2",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"de"
]
}
}
{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 20
},
{
"fieldName": "image",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
"required",
"maxbytes"
],
"fieldValidateRulesMaxbytes": "80000"
}
],
"changelogDate": "20170530185220",
"dto": "no",
"service": "serviceClass",
"entityTableName": "avatar",
"pagination": "infinite-scroll"
}
~~~
you will see if you try to upload a 100kb image
Can you put a more descriptive title? I'm sorry but "small issue" doesn't mean anything
Probably related to the same issue, when you try to delete an entity in a required relationship with another entity and assigned you get a Server Error notification in the popup while behind the popup you get success notification "A ... is deleted with identifier..."
Recently, I work on the alert system here: https://github.com/jhipster/generator-jhipster/pull/5829 specially for creating / updating / deleting entities.
Not sure if it is related to my work, so don't hesitate to ping me if you need help @JulienMrgrd
After taking a look on this, there are some bugs to fix :
[x] The double notification :arrow_up:
[x] When you delete an image, the filename remains displayed. http://imgur.com/a/8sTvI
[ ] MINOR : Do not display the same error several times when clicking the save button (without having modified anything). http://imgur.com/a/cz0zH
- [ ] The dialog title : "Create or edit a XXXXX". Replace the article "a" by "an" if the entity name begins with a consonant. (exemple : "Create or edit an Avatar").
EDIT: I am currently solving it, so I tick the boxes as I go along.
I wouldnt worry about the 4th item in the list as its difficult to do for
all languages. hence if you want you can do it for English but I would
leave it to end users to change as they see fit
Thanks & Regards,
Deepu
On Thu, Jun 1, 2017 at 4:11 PM, Julien Margarido notifications@github.com
wrote:
After taking a look on this, there are some bugs to fix :
-
The double notification ⬆️
-When you delete an image, the filename remains displayed.
http://imgur.com/a/8sTvI
-Do not display the same error several times when clicking the save
button (without having modified anything). http://imgur.com/a/cz0zH
-The dialog title : "Create or edit a XXXXX". Replace the article "a"
by "an" if the entity name begins with a consonant. (exemple : "Create or
edit an Avatar").
-The "Server Error notification" ⬆️
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/5858#issuecomment-305505082,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF4OIpoowlOZBEyKCJGtNrZUWqPRHks5r_saPgaJpZM4NqLbD
.
One more, not really related with this issue, but related to the @mtdx's entity :
avatar.model, but it's much used in html templates.
I'll do the PR after the @mtdx response (about the "Server Error" notification).
@JulienMrgrd I'm sorry I don't have that app anymore, it was a test one, basically you create 2 entities, a one to one relationship then add entries and assign 1 entity to another then you try to delete the assigned entity, you get a server error, in the debug log the actual error is a foreign key constraint error, so probably is a postgresql only error.
update or delete on table "some_table" violates foreign key constraint "fk_some_table_id" on table "some_table2"
Is not a big issue, the improvement would be here, a more descriptive error message, and the general double popup/back of the popup notification.
Thanks
Ok thanks, I'll take a look.
@JulienMrgrd : is it fixed?
In the version 4.5.4 this issue persist.
Apparently, the ErrorHandlerInterceptor.responseIntercept is called two times and the this.eventManager.broadcast( {name: 'jhipsterApp.httpError', content: error}) add two error events.
Unfortunately, I could not solve this problem. If someone already knows the solution, please share.
Grateful.
@thiagosoares-mobile I think this is a different issue. Could you please open a new issue with your configuration yo-rc file
OK @deepu105.
The issue on multiple error being displayed looks a lot like #5918.
I was able to reproduce it as well. The interceptors are being called twice.
@JulienMrgrd are you still working on this or shall we close it?
@mtdx can you check if the issue is solved in current master?
Unfortunately I do not have the time currently to work on this.
But the main corrections have been made and merged.
I keep the minor issue of @mtdx in mind, if it's still relevant.
I'm closing this as there is no information for last few days
Most helpful comment
I wouldnt worry about the 4th item in the list as its difficult to do for
all languages. hence if you want you can do it for English but I would
leave it to end users to change as they see fit
Thanks & Regards,
Deepu
On Thu, Jun 1, 2017 at 4:11 PM, Julien Margarido notifications@github.com
wrote: