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

When editing a tree, can not remove entries due to CSS bug #3035

Closed
PE1NUT opened this issue Oct 16, 2019 · 15 comments
Closed

When editing a tree, can not remove entries due to CSS bug #3035

PE1NUT opened this issue Oct 16, 2019 · 15 comments
Labels
bug Undesired behaviour resolved A fixed issue

Comments

@PE1NUT
Copy link

PE1NUT commented Oct 16, 2019

Deleting items from the tree management interface is not possible when right-clicking, because the menu ends up underneath the existing entries. See attached picture.

Cacti is version 1.2.7 from Debian Testing.

Desktop is Ubuntu 19.04, with Firefox 69.0.2
The same issue happens with Firefox 69.0.2 on OSX 10.12.6
The same issue also happens with Safari 12.1.2 on OSX 10.12.6

Cacti-Tree-bug

@bmfmancini
Copy link
Member

I am not seeing the same thing also on 1.2.7

image

I am using firefox 58.0.2

@netniV
Copy link
Member

netniV commented Oct 16, 2019

@bmfmancini if you have the 1.2.x branch, you are technically on 1.2.7+dev which is < 1.2.8 but on its way there 👍

I do believe that this was addressed by someone else raising the issue already, check though the issues since 1.2.7 and you will likely see the fix being applied.

@cigamit
Copy link
Member

cigamit commented Oct 16, 2019

If you installed this from apg-get, then I suggest you log a Debian packaging bug as it's not a core cacti bug. Just adding @paulgevers to the thread in case.

@cigamit cigamit added the 3rd Party Bug 3rd party bug label Oct 16, 2019
@PE1NUT
Copy link
Author

PE1NUT commented Oct 17, 2019

Confirmed as a Debian/Ubuntu bug:

When installing the Cacti 1.2.2 package on my Ubuntu 19.04 desktop, it has the same bug
Installing Cacti 1.2.7 from source on the same machine does -not- have the same bug. I'll try to figure out the differences, and report the results Debian/Ubuntu.

@PE1NUT
Copy link
Author

PE1NUT commented Oct 17, 2019

In Issue #2988 this is addressed by a small edit to the CSS for the 'modern theme'. Making this change suggested in that issue works for me. However, that must not be the actual root cause, because the change in question (setting z-index to 99 for .vakata-context ul) is not part of the version in Github.

@paulgevers
Copy link
Contributor

@PE1NUT can you elaborate what you did exactly? In Debian we don't use the theme files provided by Cacti, but link to the system version of jstree.

I think I need to start building a check for Cacti modifications to those files. However, it would be awesome if Cacti would just ship unmodified files and instead overload stuff in main.css.

@cigamit
Copy link
Member

cigamit commented Oct 19, 2019

Thanks for the confirmation @paulgevers. Let's keep this open then.

@cigamit cigamit added bug Undesired behaviour and removed 3rd Party Bug 3rd party bug labels Oct 19, 2019
@PE1NUT
Copy link
Author

PE1NUT commented Oct 21, 2019

@paulgevers The simplest way to reproduce the issue is:

  1. Install Cacti from Debian or Ubuntu pacakges
    Specifically, I did this on a Ubuntu 19.04 machine, which installed package cacti-1.2.2+ds1-2.
  2. Add a few graphs to the cacti tree.
  3. Try to right-click to remove one of the entries - this results in the screenshot shown above.

On the same machine, I built and installed cacti from source, after removing the packaged install.
git clone https://github.com/cacti/cacti
git checkout release/1.2.2
Install cacti by moving it to /var/www/html/cacti

Then, when adding the same graphs to the tree, and removing one, there is no issue.

I've ran a diff between the git version of release/1.2.2 and the contents of the Ubuntu 1.2.2 source package. To stop it from alerting on every file, I reverse-applied the Debian patches before running the diff. The main difference I noticed (ignoring translation files) is that a lot of jquery files are indeed missing in the Debian source package, as they are packaged separately on Debian. As the Debian system version of e.g. The jquery files that are in the Debian pacakge, are (according to diff) identical to the ones that are in the github release/1.2.2.

Our production cacti since a recent upgrade (from 0.8.x) runs on Debian Buster, and I installed (using pinning) the 1.2.7 Debian package from testing, as I had too many issues with earlier versions. In the Debian package version 1.2.7, the tree menu bug still exists. I applied the workaround suggested in #2988 as a stopgap until we can fully figure out what's breaking things.

@paulgevers
Copy link
Contributor

paulgevers commented Oct 21, 2019 via email

@PE1NUT
Copy link
Author

PE1NUT commented Oct 21, 2019

Ah, gotcha. I implemented what was suggested in this comment, to a very similar bug:
#2988 (comment)

Which is indeed quite cryptic, but amounts to this 'hack':
(Edit: put code tags around it)

--- a/libjs-jquery-jstree-3.3.7+dfsg1/src/themes/default/style.css
+++ b/usr/share/javascript/jstree/themes/default/style.css
@@ -122,6 +122,7 @@
   background: #f5f5f5;
   border: 1px solid #979797;
   box-shadow: 2px 2px 2px #999999;
+  z-index: 99;
 }
 .vakata-context ul {
   list-style: none;

@paulgevers
Copy link
Contributor

paulgevers commented Oct 21, 2019 via email

cigamit added a commit that referenced this issue Nov 9, 2019
Cannot Delete Tree Entries
@cigamit
Copy link
Member

cigamit commented Nov 9, 2019

Okay, I've resolved this one. Does it also happen in other themes?

@cigamit cigamit added the resolved A fixed issue label Nov 9, 2019
@cigamit cigamit closed this as completed Nov 29, 2019
@paulgevers
Copy link
Contributor

@cigamit thanks for fixing it in main.css

@cigamit
Copy link
Member

cigamit commented Dec 1, 2019

Not a problem. Keep the bugs coming.

@netniV
Copy link
Member

netniV commented Dec 2, 2019

Not a problem. Keep the bugs coming.

I'm sure @cigamit actually means

Now tell us we have found and quashed every last bug yay! 😄

@netniV netniV changed the title Cannot Delete Tree Entries When editing a tree, can not remove entries due to CSS bug Dec 7, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

5 participants