# Issue Getting Field Names to Display Correctly

**URL:** <https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597>\
**Category:** Module Development\
**Created:** [March 24, 2022, 3:52pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597 "2022-03-24T15:52:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [March 24, 2022, 3:52pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/1 "2022-03-24T15:52:32Z")

</div>

I have a module in which I cannot get the field names to display properly. There have been times where it does work, but rarely.

**For example, I have been able to get it to do this:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/02d291aad418ddfce8ce3fb0d1e076af6d4757ee.png)

**But most of the time it looks like this**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4c3a50b4ae301ecca6f5d650856212db948279ac.png)

**The property record looks like this**

```auto
Noun=Kafka Setting
Noun.Plural=Kafka Settings

Brokers.Name=Brokers (ADDRESS:PORT)
Enabled.Name=Enabled
UseStoreAndFwd.Name=Use Store & Forward
UseSSL.Name=Use SSL

Source.Name=Source
DispPath.Name=Display Path
SrcPath.Name=Source Path
AlarmsEnabled.Name=Enable Alarms

AuditEnabled.Name=Enable Audit

Category.Configuration=Producer Settings
Category.Alarms=Alarm Settings
Category.Audit=Audit Settings

```

**Usage Looks like this**

```auto
public class KafkaSettingsRecord extends PersistentRecord {

    public static final RecordMeta<KafkaSettingsRecord> META = new RecordMeta<KafkaSettingsRecord>(
            KafkaSettingsRecord.class, "KafkaSettingsRecord").setNounKey("KafkaSettingsRecord.Noun").setNounPluralKey(
            "KafkaSettingsRecord.Noun.Plural");

    public static final IdentityField Id = new IdentityField(META);

    //Kafka Settings
    public static final StringField BrokerList = new StringField(META, "Brokers", SFieldFlags.SMANDATORY);
    public static final BooleanField Enabled = new BooleanField(META, "Enabled").setDefault(false);
    public static final BooleanField UseStoreAndFwd = new BooleanField(META, "UseStoreAndFwd").setDefault(false);
    public static final BooleanField UseSSL = new BooleanField(META, "UseSSL").setDefault(false);

```

If anyone has experienced a similar issue in the past and has a way to fix it through code (not reseting the gateway) I’d appreciate the help fixing this non-critical, but visually very annoying problem.

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 24, 2022, 3:56pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/2 "2022-03-24T15:56:00Z")

</div>

I think this has been a development issue since the beginning… there is no fix I’m aware of aside from restarting the gateway, and there is no fix coming until this entire SORM/record system doesn’t exist any more in Ignition 8.2.

edit: although the underlying issue may be in the BundleUtil stuff… which is not part of the SORM system… hmm.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [March 24, 2022, 3:58pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/3 "2022-03-24T15:58:34Z")

</div>

I do see this when installing the module. The module functionality is fine and we are able to get data up to Kafka, just the labels won’t cooperate:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/d/cd47dcdd589939ee128f8781704f15c955f1a0fb.png)

Nick

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 24, 2022, 4:02pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/4 "2022-03-24T16:02:17Z")

</div>

Hmm. The issue I’m talking about is that basically on subsequent installs the properties can’t be resolved, like in your second screenshot.

After a gateway restart, and on any _first_ install of the module when it doesn’t already exist, the properties resolve, right?

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [March 24, 2022, 4:16pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/5 "2022-03-24T16:16:41Z")

</div>

This gateway was fresh when I installed it (never had this module on it before) and the labels didn’t work.

I restarted just now via EAM and it didn’t make them show up.

Nick

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [March 24, 2022, 4:31pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/6 "2022-03-24T16:31:33Z")

</div>

Inside of the BundleUtil what should we be passing.

In this module which we use for buffered TCP messages, it’s like this based on the OPC-UA device driver example provided by IA:

```auto
BundleUtil.get().addBundle(BufferedTcpDevice.class);

```

That module has zero issues displaying the labels. However in the module I am having issues displaying the labels it is like this:

```auto
BundleUtil.get().addBundle("kafka", getClass(), "kafka");

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 24, 2022, 4:35pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/7 "2022-03-24T16:35:01Z")

</div>

> [@nicholas.robinson](#):
>
> `BundleUtil.get().addBundle("kafka", getClass(), "kafka");`

Try this instead:

```auto
BundleUtil.get().addBundle("kafka", getClass().getClassLoader(), "kafka");

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 24, 2022, 4:42pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/8 "2022-03-24T16:42:30Z")

</div>

Don’t use BundleUtil with PersistentRecord properties. They load themselves. Name the properties file the same as the record’s class name with localization suffixes then `.properties`.

You’ll still need to restart the gateway if you _modify_ the properties file, but otherwise should work automatically.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 6, 2022, 3:19am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/9 "2022-07-06T03:19:19Z")

</div>

I have never been able to resolve the issue of field names not appearing and have spent a good amount of time going over it without success so I'm coming back here once more.

The issues are in 2 places:

**1 - Config and Status Screen Labels**

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8c1548812b418b555e73d623d719ecbda8dad08e.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/e/7edbc68d3a2d119e92d5c2fc0f489c9712f6892b.png)

**2 - Configuration Fields**

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/4/d41917646b68f6af1b872332837c6ce563167faa.png)

The resource structure looks like this:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/c/9ca3c13da8e025687fd23eb5988269cd125a3d70.png)

a bundle is created and removed on start and shutdown in the gateway hook. Things such as the panel title are referenced like this:

```auto
    public KafkaSettingsPage(final IConfigPage configPage){
        super(configPage, null, new LenientResourceModel("kafka.nav.settings.panelTitle"),
                ((IgnitionWebApp) Application.get()).getContext().getPersistenceInterface().find(KafkaSettingsRecord.META, 0L)

        );
    }

```

I always get this error when loading the module which I think is related to the issue but I cannot prevent it from occurring so far:

> java.util.MissingResourceException: Can't find bundle for base name com/walmart/ignition/gateway/kafka/kafka, locale en\_US

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 6, 2022, 10:06am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/10 "2022-07-06T10:06:47Z")

</div>

Construct links for each `.properties` with the same name but suffixes `_en` and `_en_US`. It isn’t really a proper bundle for Ignition without the localization suffixes. At least, that’s what I’ve been doing for ages now.

{ I see I’m repeating myself. You didn’t take this earlier advice. }

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 6, 2022, 12:27pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/11 "2022-07-06T12:27:24Z")

</div>

> [@pturmel](#):
>
> { I see I’m repeating myself. You didn’t take this earlier advice. }

It's not that I didn't take the advice, I'm just confused because I am trying to follow the SDK webpage example module (whose labels works perfect). I don't see \_en\_US anywhere in the SDK examples.

**Gateway Webpage Example File Structure**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/a/bac6c32623b6e39433bd37037279e0bacf9aec21.png)

**Usage in Code**

```auto
    public static final ConfigCategory CONFIG_CATEGORY =
        new ConfigCategory("HomeConnect", "HomeConnect.nav.header", 700);

```

I don't know what you mean by "construct links". Could you potentially show an example?

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 6, 2022, 4:38pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/12 "2022-07-06T16:38:41Z")

</div>

In Linux,

```auto
ln -s kafka.properties kafka_en.properties
ln -s kafka.properties kafka_en_US.properties

```

I quit using Windows for this sort of thing long before Windows had soft links. Perhaps just copy instead of linking.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [July 6, 2022, 8:23pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/13 "2022-07-06T20:23:39Z")

</div>

I think there’s something else going on here. I’m currently building my modules without the language suffixes (correctly or not) and am able to get bundles working properly on my English language only system.

Are you restarting after your changes? I always make sure to uninstall/restart whenever messing with bundles.

As you’ve identified, your two issues are separate from each other - the `KafkaSettingsRecord.properties` is loaded for you, but your `kafka.properties` needs to be loaded yourself. Can we see your `kafka.properties` contents and your `BundleUtil::addBundle` call?

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 7, 2022, 1:48am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/14 "2022-07-07T01:48:21Z")

</div>

@bmusson I have tried the restart gateway thing but it never helps. In general its also not a solution that we’d want to rely on anyways because more often than not, we cannot just reset a server when we want since it will cause customer interruptions.

**Here is the contents of kafka.properties:**

_We simply try to mimic what is in the gateway webpage example_

```auto
nav.header=Kafka
nav.settings.title=Settings
nav.settings.panelTitle=Kafka Settings
nav.status.header=Kafka Status

KafkaSettingsRecord.Category.Configuration=Producer Settings
KafkaSettingsRecord.Category.Alarms=Alarm Settings
KafkaSettingsRecord.Category.Audit=Audit Settings

```

**Here is where where Bundle Util is called at Gateway Hook Startup**

```auto
    @Override
    public void setup(GatewayContext gatewayContext) {
        this.context = gatewayContext;
        log.debug("Beginning setup of Kafka module");

        BundleUtil.get().addBundle("kafka", getClass(), "kafka");

```

**Here is where the bundle is removed at shut down**

```auto
    @Override
    public void shutdown() {
        scriptModule.shutDownSinks();
        this.context.getAlarmManager().removeListener(this.alarmFilter, alarmListener);
        BundleUtil.get().removeBundle("kafka");
        log.info("Successfully removed data sinks from kafka module!");
    }

```

I’ve been trying to get these darn labels to work for a long time by looking at the gateway webpage module as a reference but so far I have been unsuccessful.

To IA’s credit, the gateway webpage example loads the labels perfectly the first time…

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 7, 2022, 1:52am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/15 "2022-07-07T01:52:32Z")

</div>

See my previous suggestion: [Issue Getting Field Names to Display Correctly - #7 by Kevin.Herron](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/7)

Also like it or not you will need to restart the gateway for any bundle changes. Use a dev gateway to develop and test your modules.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 7, 2022, 3:21am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/16 "2022-07-07T03:21:55Z")

</div>

> [@Kevin.Herron](#):
>
> `.getClassLoader()`

Sorry for not replying back then. I did try when you suggest it back then and I tried again today but this didn't work.

I am working in a gateway where I can restart freely (non-production use) and after I installed the new build, restarted via EAM. Unfortunately it doesn't make the labels appear correctly.

I'll keep working on it.....

Nick

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 28, 2022, 3:12pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/17 "2022-07-28T15:12:38Z")

</div>

I never did find the exact reason, but I ended up rebuilding the module from the gateway webpage example and then things started to show up correctly. Since all the code was copy and pasted over, it _feels_ more like a project property/POM/other issue rather than any issue with the code itself.

In any case, the result is all that matters and it works now so I’m satisfied with that.

Nick

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/738c99c3ba2e12f5f99ca741201d3ec62b0adf1d.png)

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [November 15, 2022, 9:03pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/18 "2022-11-15T21:03:41Z")

</div>

Running into the exact same issue right now...

The logs say

```auto
java.util.MissingResourceException: Can't find bundle for base name <module_name_here>, locale en_US

```

I tried add `.classLoader()` when registering the GatewayHook.class with BundleUtils, duplicating my property files with `_en` and `_en_US` suffixes, tried restarting the Ignition gateway service and still I get badly formatted labels on the gateway config page.

I started this whole process off by cloning the `gateway-webpage` module, building it and adding it to the gateway. Then I used Maven to set up a brand new project based off of the `client-designer-gateway` archetype, like so:

(quotes were requred around the flags and values on Windows)

```auto
mvn archetype:generate "-DarchetypeGroupId=com.inductiveautomation.ignitionsdk" "-DarchetypeArtifactId=client-designer-gateway-archetype" "-DarchetypeVersion=1.2.0"

```

I then went step by step through the `gateway-webpage` project and did the same thing for my new project. I was able to build a module, but now what I'm stuck at is none of the labels showing correctly.

@Kevin.Herron @pturmel when you say restart the gateway, you mean the Ignition service not the host machine, right?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 16, 2022, 2:57am UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/19 "2022-11-16T02:57:14Z")

</div>

Yes, just the service.

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [November 16, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/issue-getting-field-names-to-display-correctly/57597/20 "2022-11-16T20:02:13Z")

</div>

I ended up resolving this issue by browsing the forums a little more and finding this comment by @Kevin.Herron that was key in fixing the label problems for me:

> [@Extending from ConfigPanel: MissingResourceException](https://forum.inductiveautomation.com/t/extending-from-configpanel-missingresourceexception/12511/4):
>
> I was mistaken about the settings page properties file - those keys should just be in the main LRS.properties file. It’s settings records that are automatically loaded and must have a mirrored package structure (things that extend PersistentRecord). If your bundle is being loaded correctly you should be able to reference the keys/values by at the path “LRS.path.to.key”, so: LRS.nav.header LRS.settings.title LRS.lrsTitle

I cloned the `gateway-webpage` example (and added it as a module to my gateway to see how it works) and then immediately created a new project based on the `client-designer-gateway-archetype`. This then requires you to either set up a directory or package structure and for me, the issue was that the `java` and `resources` directories weren't 100% mirrored so some of the properties weren't being found.

Also, another thing that was tripping me up was that, for instance, in `GatewayHook.java`, we import the `SettingsPage` and `SettingsRecord` classes, but when you reference properties in that file (like `nav.header` and `nav.settings.title` - two of the labels that showed up incorrectly for me), they're actually coming from `HomeConnect.properties`, NOT `HCSettingsRecord.properties`.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0e381ba8272e2c00e44ecd604a4688c850e2ea48.png)

If you set up everything correctly and you still get incorrect labels, you might need to do a gateway service restart. I restarted so many times (and repackaged the module) I don't know whether it would've worked the first time without a restart even if I had set everything up correctly.
