On “System” page, the main menu closes itself
Describe the bug On the “System” page, the main menu always closes very quickly.
To Reproduce Steps to reproduce the behavior:
- Go to “System” page
- Click on main menu (𓃑).
- Try to click something in the menu.
Expected behavior Menu should stay open.
Screenshots
Release 3.6 release
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Firefox 120.0
I am unable to reproduce this error. Maybe you just need to clear your browser cache and reload the page including it's resource files like Javascript and CSS to resolve this issue. At least the breadcrumb for "System" implies something like outdated stylesheets.
Refreshing the cache didn’t fix it. Also, the „smaller“ breadcrumbs continue to appear if the window is smaller than 1200 px.
The page refresh is actually triggered by clicking on the menu icon, not by the timer page refresh of the task manager, as I did think before. You see it by highlighting some text, or in the network console. It also happens on the „Legal texts“ tab
When I open the “System” page, everything is normal. Normal mouse pointer, no network activity.
When I click on the main menu, the whole page gets reloaded.
Clearing the browser cache didn’t help.
System: Ubuntu 20.04 Java: OpenJDK 11.0.21 Servlet container: Apache Tomcat 9.0.31 Release: Kitodo.Production 3.6.0 Browser: Firefox 120.0 (all extensions disabled) User: testadmin
Browser console warning:
jQuery.Deferred exception: PF(...) is undefined @http://localhost:8002/kitodo/javax.faces.resource/lists.js.jsf?ln=js:54:20 (jquery.js.jsf:2:31008)
e@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:29453
Deferred/then/l/</t<@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:29755
setTimeout handler*Deferred/then/l/<@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:29964
c@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:27742
add@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:28020
Deferred/then/<@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:30060
Deferred@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:30473
then@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:29989
@http://localhost:8002/kitodo/javax.faces.resource/lists.js.jsf?ln=js:53:13
dispatch@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:42571
add/v.handle@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:40572
EventListener.handleEvent*add@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:41039
Ae/<@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:39656
each@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:2777
each@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:1419
Ae@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:39632
on@http://localhost:8002/kitodo/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=8.0&v=8.0:2:46222
@http://localhost:8002/kitodo/javax.faces.resource/lists.js.jsf?ln=js:52:11
undefined
The code in question is here:
I temporarily fixed this problem …
$(window).on("load", function () {
$.ready.then(function () {
if (typeof PF === 'function') {
if (typeof PF('processesTable').selection !== "undefined" && (PF('processesTable').selection[0] === '@all' || PF('processesTable').selection.length === PF('processesTable').cfg.paginator.rowCount )) {
PF('processesTable').selectAllRows();
PF('processesTable').selection=new Array("@all");
$(PF('processesTable').selectionHolder).val('@all');
let excludedIds = $('#excludedProcessIds').children();
for(let i = 0; i < excludedIds.length; i++) {
let processId = excludedIds.get(i).textContent;
PF('processesTable').unselectRow($('tr[data-rk="' + processId + '"]'), true);
}
}
}
});
});
The warning is gone, but the behaviour is still the same. So this seems not to be the problem
JSF decides for some reason, that the whole page needs to be updated. XHR response starts with:
<?xml version="1.0" encoding="UTF-8"?><partial-response id="j_id__v_0"><changes><update id="javax.faces.ViewRoot"><