Ad Widget

Collapse

Bug when editing a screen?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #1

    Bug when editing a screen?

    I'm running 1.6.3, and I think there's a bug that will cause a screen to disappear from the frontend. Here's the scenario.

    Take a screen that has an empty cell, click on change in that cell.
    Adjust the width and/or height, do not assign it an item, and click save.
    The screen is now gone, and there is an item in the DB that looks like this:

    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    | screenitemid | screenid | resourcetype | resourceid | width | height | x | y | colspan | rowspan | elements | valign | halign | style | url | dynamic |
    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    | 24 | 10 | 0 | 0 | 150 | 100 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 |
    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    1 row in set (0.00 sec)


    It's the resourcetype or resourceid that causes the permissions issue and the screen to disappear. Thought I should pass it along.

    Pat
  • t2y
    Member
    • Feb 2009
    • 60

    #2
    Hi Aly(or other GUI developer),

    I think this is bug. Please confirm my test result related to registering screen. I confirmed on zabbix-1.6.4.

    how to reproduce)
    1. "Create Screen" on Configuration/Screens window
      Name: EmptyScreenTest
      Columns: 1
      Rows: 1
    2. Select "Edit" in "EmptyScreenTest"
    3. Select "Change"
    4. Select just "Save" without set "Graph name"
      # refer to 1st attached image
    5. You can see "Item added" and "ERROR: No permission!"
      # refer to 2nd attached image

    Additionally, this garbage data(screenitemid=3) is stored into "screens_items" table.
    mysql> select * from screens_items;
    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    | screenitemid | screenid | resourcetype | resourceid | width | height | x | y | colspan | rowspan | elements | valign | halign | style | url | dynamic |
    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | | 0 |
    | 3 | 3 | 0 | 0 | 500 | 100 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 |
    +--------------+----------+--------------+------------+-------+--------+---+---+---------+---------+----------+--------+--------+-------+-----+---------+
    2 rows in set (0.00 sec)
    I investigated a little. I think the cause is validation check in "screenedit.php". The $_REQUEST["resourceid"] hasn't checked(it's set zero) when we try to save screen cell. After that, we get error since it cannot find "resourceid".
    We should check whether $_REQUEST["resourceid"] has a value configured from "Resource".

    What do you think?
    Attached Files
    Last edited by t2y; 10-04-2009, 03:41.

    Comment

    • Aly
      ZABBIX developer
      • May 2007
      • 1126

      #3
      Yes, this should be fixed soon. Thank you.

      Fixed. rev. 7174
      Last edited by Aly; 15-04-2009, 13:34.
      Zabbix | ex GUI developer

      Comment

      Working...