Ad Widget

Collapse

Managed to break widget.view.php - Please help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alistair.Davies
    Junior Member
    • Dec 2023
    • 8

    #1

    Managed to break widget.view.php - Please help!

    Hi Guys,

    Could someone point me in the right direction please, I was messing around with the ITEM VALUE widget and have managed to break it.

    The code I was editing is under /usr/share/zabbix/widgets/item/views/widget.view.php

    My question is there a way to repair Zabbix front-end just to fix the widget or is there a repo where I can copy the original php code or does anyone have the original code, I have attached the piece of broken code along with a screenshot of the dashboard all the data is still saved in the widget I just cannot view it in the dashboard, the version of Zabbix is 6.4.10 and is running on a Azure container instance of Red Hat Linux Enterprise Version 8.6

    Thanks in advance
    Attached Files
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Look at https://git.zabbix.com/projects/ZBX/...idget.view.php

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #3
      Next time create a backup first..

      Comment

      • Alistair.Davies
        Junior Member
        • Dec 2023
        • 8

        #4
        cyber yes a very silly mistake I still haven't managed to fix it would renaming the PHP file help?

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4806

          #5
          Hamardaban gave you the link to "original".. copy all the content to your file, it should be ok after that. Then make a copy of the original and try your changes again... You can always copy back the working one.
          EDIT: ok .. maybe you need some other file.. not exactly sure which one you edited... But you should be able to find it from zabbix git anyway...
          Last edited by cyber; 10-01-2024, 14:23.

          Comment

          • Alistair.Davies
            Junior Member
            • Dec 2023
            • 8

            #6
            Thank you guys I have managed to find the right php code and copying it over the old broken code, all is working again

            Comment

            Working...