opendcim / openDCIM

An open source (GPL v3) Data Center Inventory Management (DCIM) application.
http://opendcim.org
305 stars 204 forks source link

23.04 upgrade - CDU's do not have any Update/copy/export connection etc. buttons at bottom as well as some power specifications missing #1496

Closed cpbonamico closed 7 months ago

cpbonamico commented 7 months ago

Describe the bug We have upgraded from 21.01 to 23.04 and all is good. Everything is working fine with the exception of the CDU's. They are there but when we drill down to the CDU itself. the page does not have any of the regular buttons on the bottom of the screen.

To Reproduce Steps to reproduce the behavior:

  1. install 23.04
  2. import sqldump and image files
  3. Upgrade DCIM
  4. login and go to a CDU
  5. No buttons at bottom and no complete power specification details.
  6. unable to modify CDU's
dcim23 04
wilpig commented 7 months ago

What errors are you seeing in the apache error log? I've tested this on the dev build and it isn't showing this behavior, did you test it on the demo.opendcim.org site?

https://dev.opendcim.org/devices.php?DeviceID=4682

cpbonamico commented 7 months ago

Thank you for your help. I tried it on the test site and it worked. Then I tested it on my site by creating a new CDU and the buttons appeared as should. I looked at the httpd error log file and it said the pictures directory was incorrect. I had moved them along side of the openDCIM directory. I did set the proper relative path in the configuration page to reflect this move. After copying them to the openDCIM/openDCIM-23.04 directory this error disappeared and the button appeared as should. The solution appears to be... make sure you locate your drawings and pictures directories in the same locations as prior installs and make sure the relative path is correct You guys are great and really appreciate the help. Thank You!

cpbonamico commented 7 months ago

Sorry Correction...I was wrong...The buttons dont appear after changing the relative paths.

wilpig commented 7 months ago

The only thing I can say to check is make sure you have write rights to the device.

https://github.com/opendcim/openDCIM/blob/master/devices.php#L2614

If you want to test if it's rights related above this if statement add

$write=true;
wilpig commented 7 months ago

I don't see any of the power port stuff listed there in your screenshot like the page broke before even getting to the bottom where the buttons should be. There should be some other error somewhere.

samilliken commented 7 months ago

I'm wondering if he didn't let the upgrade run for each version and the schema is off. May want to restore back from the 21.01 db and rerun the install script - make sure that you don't hit refresh until you see the text telling you to refresh.

cpbonamico commented 7 months ago

Hello, I am going to delete and re-import the DB...and let the script run for some time.... let you know what the status is when complete. TY...

cpbonamico commented 7 months ago

Hey Guys, I re-imported the DB (it has~50K devices) and let the import run for some time and it never went to DCIM. It just stayed at the screen that says to hit F5 (Anything shown here is just a notice. It is not necessarily an error. We will occasionally have to repeat database modifications that will fail and will show here. This is behavior is to be expected. Take note of any errors displayed in red then press F5 to reload this page until it goes to the configuration screen.)

After waiting 20 minutes I hit the F5 button and DCIM launched.... and the CDU's still don't show up with buttons on the bottom.

If i create a new CDU everything works fine and the buttons show......but the old CDU's still don't have the buttons..... This is my last issue to go to 23.04....any suggestions.....

I did try adding "$write=true;" to the devices.php (line2604) file but that didn't help. the page didnt load.

wilpig commented 7 months ago

this is likely related https://github.com/opendcim/openDCIM/issues/1509

cpbonamico commented 7 months ago

Thank you Wilbur! That totally worked!

PHP fix for CDU in DCIM