View Issue Details

IDProjectCategoryView StatusLast Update
1123RackTablesdefaultpublic2016-05-04 01:04
Reportermanderson Assigned Toadoom42  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
OSSLESOS Version11 
Product Version0.20.6 
Target Version0.20.7Fixed in Version0.20.7 
Summary1123: Rackspace doesn't display
DescriptionWhen I click the Rackspace link, after some time, the only thing to display is "Location Row Racks", but no graphics, or any other text, and there is no top bar w/ links either. I believe this occurred after I added an additional rack to a location. After perusing the mail list, I noticed others have had this problem as well, and it turned out to be a corrupt entry in the database, but I'm unable to locate said entry. The email is listed here:
 On Behalf Of Murray Brydon
Sent: Saturday, December 21, 2013 5:03 AM

To: racktables-users@freelists.org
Subject: [racktables-users] Re: Racks not showing up
 
I had a similar problem recently when adding a new location, by having a look at the racks table I could see that the parents were all wrong, so removing my new location and amending the table manually in phpmysql got me back to where I started.

Steps To ReproduceClick on RackSpace
TagsNo tags attached.

Relationships

has duplicate 1223 closedadoom42 Rackspace section unusable 
related to 1625 closed Warning: There is likely a circular reference in the location tree. Investigate location 2828. 

Activities

manderson

manderson

2013-12-27 21:31

reporter  

manderson

manderson

2013-12-27 21:32

reporter   ~0002043

I've restarted apache numerous times, no help. The error log doesn't show anything either.
adoom42

adoom42

2013-12-28 04:03

administrator   ~0002045

Try changing these settings in your php.ini file and restarting apache:

error_reporting = E_ALL | E_STRICT
display_errors = On

If you still don't see any errors, please consider sending a full mysqldump of your database to devteam <at> racktables.org. I'm unable to reproduce the problem and need more information to continue.
manderson

manderson

2013-12-28 13:00

reporter   ~0002047

After making the changes to php.ini, I get the following message on the rackspace page once I click the link:
Fatal error: Maximum execution time of 30 seconds exceeded in /srv/www/htdocs/racktables/wwwroot/inc/interface.php on line 455
This is out of interface.php:
 427 // Zero value effectively disables the limit.
    428 $maxPerRow = getConfigVar ('RACKS_PER_ROW');
    429 $order = 'odd';
    430 if (count ($rows))
    431 {
    432 echo '<table border=0 cellpadding=10 class=cooltable>';
    433 echo '<tr><th class=tdleft>Location</th><th class=tdleft>Row</th><th class=tdleft>Ra
    433 cks</th></tr>';
    434 foreach ($rows as $row)
    435 {
    436 $location_id = $row['location_id'];
    437 $row_id = $row['row_id'];
    438 $row_name = $row['row_name'];
    439 $rackList = $row['racks'];
    440
    441 if (
    442 $location_id != '' and isset ($_SESSION['locationFilter']) and !in_a
    442 rray ($location_id, $_SESSION['locationFilter']) or
    443 empty ($rackList) and ! $cellfilter['is_empty']
    444 )
    445 continue;
    446 $rackListIdx = 0;
    447 echo "<tr class=row_${order}><th class=tdleft>";
    448 $locationTree = '';
    449 while ($location_id)
    450 {
    451 $parentLocation = spotEntity ('location', $location_id);
    452 $locationTree = "» <a href='" .
    453 makeHref(array('page'=>'location', 'location_id'=>$p
    453 arentLocation['id'])) .
    454 "${cellfilter['urlextra']}'>${parentLocation['name']
    454 }</a> " .
    455 $locationTree;
    456 $location_id = $parentLocation['parent_id'];
    457 }
    458 $locationTree = substr ($locationTree, 8);
    459 echo $locationTree;
    460 echo "</th><th class=tdleft><a href='".makeHref(array('page'=>'row', 'row_id
    460 '=>$row_id))."${cellfilter['urlextra']}'>${row_name}</a></th>";
    461 echo "<th class=tdleft><table border=0 cellspacing=5><tr>";
    462 if (!count ($rackList))
    463 echo "<td>(empty row)</td>";
adoom42

adoom42

2013-12-28 18:46

administrator   ~0002049

You probably have a loop in your location tree.

Example:
Location A is the parent of Location B.
Location B is the parent of Location C.
Location C is the parent of Location A.

This query will return your tree: SELECT id, parent_id FROM Location

Once you find the culprit, delete the relationship. (Back up your DB first.)

DELETE FROM EntityLink WHERE parent_entity_type='location' AND parent_entity_id=<parent_id> AND child_entity_type='location' AND child_entity_id=<child_id>;
manderson

manderson

2013-12-30 17:01

reporter   ~0002051

That did it, thanks. Do you know how it happened? How can I stop it from happening again? Thanks
adoom42

adoom42

2013-12-30 21:48

administrator   ~0002053

I don't know why it happened. 0.20.7 will include some additional validation checks.

1. When editing a location, verify that the selected parent is not a child of the subject.
2. When parsing a location tree, give up if the depth exceeds 20 levels. In such a case, a circular reference probably exists.

Issue History

Date Modified Username Field Change
2013-12-27 21:31 manderson New Issue
2013-12-27 21:31 manderson File Added: Screen Shot 2013-12-27 at 3.31.00 PM.png
2013-12-27 21:32 manderson Note Added: 0002043
2013-12-28 04:03 adoom42 Note Added: 0002045
2013-12-28 13:00 manderson Note Added: 0002047
2013-12-28 18:46 adoom42 Note Added: 0002049
2013-12-28 18:46 adoom42 Assigned To => adoom42
2013-12-28 18:46 adoom42 Status new => acknowledged
2013-12-30 17:01 manderson Note Added: 0002051
2013-12-30 21:48 adoom42 Note Added: 0002053
2013-12-30 21:48 adoom42 Status acknowledged => closed
2013-12-30 21:48 adoom42 Resolution open => fixed
2013-12-30 21:48 adoom42 Fixed in Version => 0.20.7
2013-12-30 21:48 adoom42 Target Version => 0.20.7
2014-05-07 06:43 adoom42 Relationship added has duplicate 1223
2016-05-04 01:04 adoom42 Relationship added related to 1625