znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
333 stars 82 forks source link

Drop-down menues in the overview not lockable and/or permanently open #503

Closed schnudd31do3 closed 8 months ago

schnudd31do3 commented 8 months ago

Environment

Expected behaviour

The drop down menues in the overview on the left side should be able to be opened and closed. They should be closed by default, otherwise they partially overlap the list of tickets.

Actual behaviour

The drop down menues are permanently open and can not be closed. image image

mo-azfar commented 8 months ago

Same as mine.. Can show show the console log?

Mine

image.png

schnudd31do3 commented 8 months ago

Looks similar to mine: image

hanneshal commented 8 months ago

Hello @mo-azfar @schnudd31do3 could one of you disable the Sysconfig: Loader::Enabled::JS and check the console log again.

This will print a readable error.

Thanks

mo-azfar commented 8 months ago

Hello @mo-azfar @schnudd31do3 could one of you disable the Sysconfig: Loader::Enabled::JS and check the console log again.

This will print a readable error.

Thanks

The moment Loader::Enabled::JS is disabled, the console log error gone

image

mo-azfar commented 8 months ago

I do some checking previously,

just compared some js files.. the are called at Dashboard and Statistic module..

7.0.11 use thirdparty/d3-3.5.7/d3.min.js 7.0.12 use thirdparty/d3-3.5.7/d3.js

restoring d3.min.js from 7.0.11 to 7.0.12 and set back the config to point to d3.min.js and the error gone and dashboard/statistic working again..

schnudd31do3 commented 8 months ago

Hello @mo-azfar @schnudd31do3 could one of you disable the Sysconfig: Loader::Enabled::JS and check the console log again. This will print a readable error. Thanks

The moment Loader::Enabled::JS is disabled, the console log error gone

image

This did not make any difference. Means, did not help.

schnudd31do3 commented 8 months ago

Where can I set the config for d3.min.js?

I copied the ./thirdparty/d3-3.5.7/d3.min.js from 7.0.11 to 7.0.12 and renamed it to d3.js -> the drop-down menues have gone. This is no solution

hanneshal commented 8 months ago

Hi, Question. Does the d3.js acutally exist on your instances? Is there a 404 not found in the network tab?

If there is no error and the file exists, can you please run:

/opt/znuny/bin/znuny.Console.pl Maint::Config::Rebuild --cleanup

If you modified the default loader, you need to reset the loader config yourself Loader::module::AgentDashboard###001-Framework and Loader::module::AgentStatistics###001-Framework

Regards Johannes

schnudd31do3 commented 8 months ago

image

image

hanneshal commented 8 months ago

Both settings are correct, no need to change it. The JS Error is gone, which was the point.

If the menu still does not open, we can carry on with the bug search. @mo-azfar wrote:

restoring d3.min.js from 7.0.11 to 7.0.12 and set back the config to point to d3.min.js and the error gone
and dashboard/statistic working again..

So I think he took over the issue for the DashboardStats, and not with the menu problem itself.

schnudd31do3 commented 8 months ago

"The JS Error is gone, which was the point." unfortunately not. It only causes that the menue is not shown any more. Ok in this case we could say the error has gone by making the menue invisible (in my case).

mo-azfar commented 8 months ago
  1. d3.js is exist.

  2. Both of the default setting as below correctly point to d3.js Loader::module::AgentDashboard###001-Framework Loader::module::AgentStatistics###001-Framework

  3. Error in console log as described in 1st post Also effected some display / filter button at the Dashboard and Statistic.

  4. executed /opt/znuny/bin/znuny.Console.pl Maint::Config::Rebuild --cleanup, still the issue occurred.

  5. Since this is working on version 7.0.11 and below, i took a deeper look at the Loader::module::AgentDashboard###001-Framework and Loader::module::AgentStatistics###001-Framework

version 7.0.11 used thirdparty/d3-3.5.7/d3.min.js version 7.0.12 use thirdparty/d3-3.5.7/d3.js

  1. I restoring d3.min.js (from 7.0.11) to 7.0.12 and set back the config to point to d3.min.js and the error gone and dashboard/statistic working again

    Loader::module::AgentDashboard###001-Framework and
    Loader::module::AgentStatistics###001-Framework

image

  1. Below is the video after changes.

https://github.com/znuny/Znuny/assets/62957738/3d4ef00b-89cc-4ccd-b43c-976bdf113a85

schnudd31do3 commented 8 months ago
  1. I changed the config as shown.
  2. /opt/znuny/bin/znuny.Console.pl Maint::Config::Rebuild --cleanup
  3. reboot of the server
  4. Result like shown in the video from @mo-azfar

Thanks.

mo-azfar commented 8 months ago
  1. I changed the config as shown.
  2. /opt/znuny/bin/znuny.Console.pl Maint::Config::Rebuild --cleanup
  3. reboot of the server
  4. Result like shown in the video from @mo-azfar

Thanks.

So, it back to normal / expectation? If yes, i suspect perhaps the d3.js not playing well with based code or either one

schnudd31do3 commented 8 months ago

"So, it back to normal / expectation?" yes. In hindsight in my case I needed to restart the znuny services (or reboot of the server) to make it working.

Perhaps someone from the developers of Znuny can say why the switch to d3.js was necessary. Apparently, the software works better with the previous d3.min.js. But maybe we don't see all the effects on the software by going back to the previous d3.min.js

mo-azfar commented 8 months ago

"So, it back to normal / expectation?" yes. In hindsight in my case I needed to restart the znuny services (or reboot of the server) to make it working.

Perhaps someone from the developers of Znuny can say why the switch to d3.js was necessary. Apparently, the software works better with the previous d3.min.js. But maybe we don't see all the effects on the software by going back to the previous d3.min.js

Yeah..there maybe and effect / not by going back to d3.min.js.. as this like temporary fix, i suggest keep track of this until see proper official fix.

hanneshal commented 8 months ago

We did some digging around in this. The problem is related to the JS Loader / Minifier.

1) Loader Disabled -> Works 2) JavaScript::Minifier (Old Loader) -> Works 3) JavaScript::Minifier::XS (Default) -> does not work

We need to investigate this further. Possible workarounds, as already shown. a) Disable Loader (not recommended) b) Replace content from d3.js with d3.min.js c) Uninstall JavaScript::Minifier::XS

Regards

constantin-vitrado commented 8 months ago

Ok, the solutions were outlined here already, but I had difficulties following them. So my path to fixing the frontend was:

  1. fetch the d3.min.js from the previous release https://download.znuny.org/releases/znuny-7.0.11.zip
  2. copy it into /var/httpd/htdocs/js/thirdparty/d3-3.5.7/
  3. move d3.min.js to d3.js
  4. bin/znuny.Console.pl Maint::Config::Rebuild --cleanup
jepf commented 8 months ago

Internal MRs: 1037, 1038

jepf commented 8 months ago

This will be fixed in release 7.0.13 (and 6.5.5).

peralta00 commented 7 months ago

https://github.com/znuny/Znuny/issues/518