# Cube Module vs. Icinga Director - Capital letter in custom host variable prevents from modifing hosts

**URL:** <https://community.icinga.com/t/cube-module-vs-icinga-director-capital-letter-in-custom-host-variable-prevents-from-modifing-hosts/9298>\
**Category:** Icinga Web Modules\
**Tags:** cube, director\
**Created:** [February 24, 2022, 9:37am UTC](https://community.icinga.com/t/cube-module-vs-icinga-director-capital-letter-in-custom-host-variable-prevents-from-modifing-hosts/9298 "2022-02-24T09:37:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexR](https://community.icinga.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@AlexR](https://community.icinga.com/u/AlexR)\
**Post date:** [February 24, 2022, 9:37am UTC](https://community.icinga.com/t/cube-module-vs-icinga-director-capital-letter-in-custom-host-variable-prevents-from-modifing-hosts/9298/1 "2022-02-24T09:37:16Z")

</div>

Unfortunately I do have a custom host variable “Location” with a capital letter at the beginning.  
This wasn’t a big deal until now.  
When using the Cube Module it is showing the variable with the capital “L” in the drop-down list but when selecting it it is converted to a small “L”.

URL:  
`.../icingaweb2/cube/hosts?dimensions=Location&showSettings=1#!/icingaweb2/cube/hosts/details?dimensions=location&location=ber`

When selecting _“Show host status”_ everything is fine (hosts are displayed) but the director function is showing _“Modify 0 hosts”_ and throwing this error when clicked:

```auto
Uncaught Error: Call to a member function hasConnection() on bool in /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php:145
Stack trace:
#0 /usr/share/icingaweb2/modules/director/application/forms/IcingaMultiEditForm.php(28): Icinga\Module\Director\Web\Form\DirectorObjectForm->object()
#1 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(186): Icinga\Module\Director\Forms\IcingaMultiEditForm->setObjects(Array)
#2 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(169): Icinga\Module\Director\Web\Controller\ObjectsController->commonForEdit()
#3 /usr/share/icingaweb2/modules/director/application/controllers/HostsController.php(37): Icinga\Module\Director\Web\Controller\ObjectsController->editAction()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\HostsController->editAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(7

```

One of my approaches would be modifying the variable to small letters directly in the Icinga Director database (2000+ hosts).  
Is this a good idea?  
Any other recommendations? Opening an Issue for the Cube Module?

I’ve seen that there is a new Cube Module release planned for next week (v1.2.0) but I haven’t found any open/closed issues that correspond to this error.

Thanks for your comments!

Regards,  
AlexR

**Environment:**

- Icinga Web 2 version: 2.9.3
- Used modules and their versions (System - About):
  - Cube 1.1.1
  - Director master\_20210715

- Icinga 2 version used (`icinga2 --version`): 2.13.1
- PHP version used (`php --version`): php-fpm 7.3.29
- Server operating system and version: CentOS 7

---

<div class="post-metadata">

**Author:** ![nilmerg](https://community.icinga.com/user_avatar/community.icinga.com/nilmerg/32/277_2.png) [@nilmerg](https://community.icinga.com/u/nilmerg)\
**Post date:** [February 24, 2022, 10:53am UTC](https://community.icinga.com/t/cube-module-vs-icinga-director-capital-letter-in-custom-host-variable-prevents-from-modifing-hosts/9298/2 "2022-02-24T10:53:33Z")

</div>

Hi,

there is already an issue for this: [Dimension slicing by custom data field names with certain characteristics cause failures or stacktrackes · Issue #62 · Icinga/icingaweb2-module-cube · GitHub](https://github.com/Icinga/icingaweb2-module-cube/issues/62)

And it’s fixed in the master, the next release will include it.

---

<div class="post-metadata">

**Author:** ![AlexR](https://community.icinga.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@AlexR](https://community.icinga.com/u/AlexR)\
**Post date:** [February 24, 2022, 12:51pm UTC](https://community.icinga.com/t/cube-module-vs-icinga-director-capital-letter-in-custom-host-variable-prevents-from-modifing-hosts/9298/3 "2022-02-24T12:51:53Z")

</div>

Thanks for the quick reply! I’m sorry for missing that issue (or didn’t I get it?).  
It saved my day. I’m looking forward to the next release.
