[racktables-users] Bug Report: Can create objects without common name

  • From: Killsystem <killsystem@xxxxxxxxxxxxxxxx>
  • To: <racktables-users@xxxxxxxxxxxxx>
  • Date: Wed, 08 Jul 2009 06:17:12 +0000

I use version 0.17.1 and recognized that I can create object without common
name. I check the config option "List source: object, for which common name
should be set" and the object type is listed there.
If you search for an object without common name but with barcode you
receive a strange error message. To reproduce follow this steps:
1. Add network switch without common name but with barcode (e.g. 123456)
2. Search for barcode (123456)
3. You get an error message like this:
SQL query 'SELECT tag_id, RackObject.id, RackObject.name, RackObject.label,
RackObject.barcode, RackObject.asset_no, RackObject.objtype_id, (select
rack_id from RackSpace where object_id = id order by rack_id asc limit 1)
as rack_id, (select name from Rack where id = rack_id) as Rack_name,
(select row_id from Rack where id = rack_id) as row_id, (select name from
RackRow where id = row_id) as Row_name, (select dict_value from Dictionary
where dict_key = objtype_id) as objtype_name, RackObject.has_problems,
RackObject.comment FROM RackObject LEFT JOIN TagStorage on entity_realm =
'object' and entity_id = RackObject.id WHERE RackObject.id = 963 ORDER BY
tag_id'
failed in useSelectBlade with error 2014 (Cannot execute queries while
other unbuffered queries are active.  Consider using
PDOStatement::fetchAll().  Alternatively, if your code is only ever going
to run against mysql, you may enable query buffering by setting the
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)

Go back or try starting from index page.
Fatal error: Call to a member function fetch() on a non-object in
/var/www/vhosts/racktables.org/demo/0.17.1/inc/database.php on line 373 

Workaround:
1. Note the RackObject ID from the SQL query
2. Open the following URL in your webbrowser:
https://your.racktable.installation/?page=object&object_id={ID} (replace
{ID} with the RackObject ID from step 1)
3. Enter a common name
4. Search for the barcode (123456)
Now everything works again.

I think the option "List source: object, for which common name should be
set" should be "List source: object, for which common name MUST be set" an
those types must be prechecked before you can add them.

Hope I could help.

Killsystem

Other related posts: