Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
schnudd31do3 opened this issue Oct 19, 2023 · 21 comments
Closed
Assignees
Labels
1 - 🐞 bug 🐞 An issue with the system. 4 - internal Issue/MR 4 - verified This issue or pull request was verified.

Comments

@schnudd31do3
Copy link

Environment

  • OS: Debian 12
  • Browser: Chrome
  • Znuny version: 7.0.12

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
Copy link

mo-azfar commented Oct 19, 2023

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

Mine

image.png

@schnudd31do3
Copy link
Author

Looks similar to mine:
image

@hanneshal
Copy link

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
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Author

schnudd31do3 commented Oct 20, 2023

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
Copy link

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
Copy link
Author

  • "Does the d3.js acutally exist on your instances?" -> yes

  • "Is there a 404 not found in the network tab?" -> no

image

  • "/opt/znuny/bin/znuny.Console.pl Maint::Config::Rebuild --cleanup" -> no difference

  • There are two js files. Which one has to be changed?

image

  • Changing the d3-config did not solve the problem, because this solution only disables the drop-down menues(see above).

@hanneshal
Copy link

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
Copy link
Author

schnudd31do3 commented Oct 20, 2023

"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
Copy link

mo-azfar commented Oct 20, 2023

  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.
after.changes.mp4

@schnudd31do3
Copy link
Author

  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
Copy link

  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
Copy link
Author

"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
Copy link

"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
Copy link

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

@hanneshal hanneshal self-assigned this Oct 20, 2023
@hanneshal hanneshal added 1 - 🐞 bug 🐞 An issue with the system. 4 - verified This issue or pull request was verified. labels Oct 20, 2023
@constantin-vitrado
Copy link

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
Copy link
Contributor

jepf commented Oct 27, 2023

Internal MRs: 1037, 1038

@jepf
Copy link
Contributor

jepf commented Oct 30, 2023

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

@peralta00
Copy link

peralta00 commented Nov 30, 2023

#518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - 🐞 bug 🐞 An issue with the system. 4 - internal Issue/MR 4 - verified This issue or pull request was verified.
Development

No branches or pull requests

6 participants