You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-06-20 23:07:46

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Refresh too fast when choosing an item from dropdown lists

Hi everybody, this is Marco, a newbie here.

I'm setting up a GLPI installation from scratch, and I'm facing a strange (for me) behaviour: when I try to update any element (whatever it is) choosing an item from a dropdown list (whatever it is) if I'm not quick enough to press "save" in time the page gets refreshed ignoring my modification.

In one particular case this is simply impossible: configuring a job of the task I created for the network discovery, the selection of an IP range is required but... no way! I pick one from the list, then press "Add" but the page gets refreshed and the job isn't modified. I guess I should press "Update" too, but I'm not that fast!

I'm pretty sure it isn't a browser issue, since it happens either on Firefox and Chrome.

Thanks for any help in advance!

Marco

=======================
GLPI 9.5.5
FusionInventory 9.5+3.0
on a LAMP stack

Offline

#2 2021-06-23 13:27:47

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 757
Website

Re: Refresh too fast when choosing an item from dropdown lists

Hi,

I can't see for sure, but please check if:
General > Default values > Assistance > Automatically refresh data (tickets list, project kanban) in minutes is set to a really low value.
Cheers,

Offline

#3 2021-06-23 18:58:26

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

Hi, thanks a lot for the suggestion; unfortunately it didn't work.
That refresh value was set to Never, I changed it anyway to 5', but nothing changed.

Regards

Last edited by MSpi59 (2021-06-23 18:59:04)

Offline

#4 2021-06-23 19:08:35

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 757
Website

Re: Refresh too fast when choosing an item from dropdown lists

Funny.
Maybe your apache logs will show some unexpected request. Otherwise, I'm out of ideas.

Offline

#5 2021-06-24 13:16:03

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,335
Website

Re: Refresh too fast when choosing an item from dropdown lists

I assume this form is a part of FusionInventory? Sounds like the Add button is submitting the full form on accident which would trigger that page refresh.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Online

#6 2021-06-24 23:33:45

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

makeijan wrote:

Maybe your apache logs will show some unexpected request. Otherwise, I'm out of ideas.

It could be not that easy getting the logs, I'll ask the provider.

cconard96 wrote:

I assume this form is a part of FusionInventory?

That form yes, but the same thing happens also, for example, if I try to change the type of a project, or the user of a project. It looks like a general issue, not limited to Fusioninventory.

Offline

#7 2021-06-25 20:01:33

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

Well,  I beg your pardon  but I don't understand how to attach anything...
Here is what I did:  from the Firefox developer tools I created two HAR files (https://toolbox(dot)googleapps.com/apps/har_analyzer/), one to register a normal change in a project (completion % set to 10%), and one to register a... should-be-normal change (change type from IT-Mgmt to IT-Service), both choosing from a dropdown list.
In the second one is clearly missing any POST statement (I'll attach them as soon as I know how to do it). The only difference I see is that the percentage dropdown list is built-in, while the project's type one is customized.
Hope this can be of some help...
Thanks

Last edited by MSpi59 (2021-07-06 11:17:53)

Offline

#8 2021-07-09 14:34:07

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

Guys, I'm in big troubles with this... it's just me facing this issue?
Even when creating a new user: I pick-up an entity from the entities list, but if I'm not quick enough to hit "add" in time, the page refresh takes place and the entity field isn't changed.
It's very, very frustrating!

Thanks.

Last edited by MSpi59 (2021-07-09 19:10:34)

Offline

#9 2021-07-12 10:41:40

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

For info: I opened a bug in Github (#9275)

Offline

#10 2021-07-12 11:54:50

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,335
Website

Re: Refresh too fast when choosing an item from dropdown lists

I started to look at the issue after the GitHub issue was opened, installed FusionInventory since you had that enabled, and tested the steps you provided a few times. I couldn't get the issue to happen to me.

Does the issue happen every time for the Default Entity dropdown?

Could right click one of the problematic dropdowns, select Inspect, and take screenshots of "change" event handlers in the Elements > Event Listeners panel. Could you do one with Ancestors checked and one without?
You may not be able to add the images here, but you can do that over in the GitHub issue.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Online

#11 2021-07-12 12:00:09

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,335
Website

Re: Refresh too fast when choosing an item from dropdown lists

Actually since those are Select2 dropdowns, after clicking Inspect you will have to click on the "select" tag located a few lines above what gets highlighted in the Elements panel.

Last edited by cconard96 (2021-07-12 12:00:22)


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Online

#12 2021-07-13 11:00:13

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

cconard96 wrote:

Does the issue happen every time for the Default Entity dropdown?

Yes, but please keep in mind that the issue is NOT LIMITED to that dropdown list; that one it's just an example.

cconard96 wrote:

Could right click one of the problematic dropdowns, select Inspect, and take screenshots of "change" event handlers in the Elements > Event Listeners panel. Could you do one with Ancestors checked and one without?
Actually since those are Select2 dropdowns, after clicking Inspect you will have to click on the "select" tag located a few lines above what gets highlighted in the Elements panel.

Not sure to fully understand your request (what does Ancestors mean?); please have a look at the screenshots in github.

Thanks!

Offline

#13 2021-07-13 11:07:15

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,335
Website

Re: Refresh too fast when choosing an item from dropdown lists

I don't use Firefox often and forgot those option aren't there, just in Chrome. I posted a reply in Github, but basically you need to click the Event button next to the element. I highlighted it in a screenshot on GitHub.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Online

#14 2021-08-06 15:02:14

MSpi59
Member
Registered: 2021-06-20
Posts: 10

Re: Refresh too fast when choosing an item from dropdown lists

For info: the problem gets solved after enabling Zend OPCache. At least for my installation.

Thanks.

BR
Marco

Offline

Board footer

Powered by FluxBB