Site Admin/Editor cannot modify device tags in device properties on dashboard

I noticed that a site admin/editor cannot modify device tags for any device assigned to their site. When modifying a tag and saving, it says “Error: invalid or missing fields”. System and Company admins are the only ones able to modify these tags. Is this a bug or is the platform designed this way? Admins/editors of a site are currently given the same privileges as a viewer. Any help would be greatly appreciated.

Site admins/editors should be able to edit tags. There definitely could be a bug. Let me test and see what’s up.

To avoid confusion for other readers, this question is related to the Connected Product Foundation (CPF) template.

1 Like

There is indeed a bug. When the user belongs to a site, the page does not render the customer/site selectors since site users cannot change those. Instead, there is a hidden form field that contains the value. That form field is missing the name attribute, so the workflow fails verification. To fix it:

  1. Open the experience page cpf-page-device-details.

  2. Find the hidden form field. If you’re on the most recent version of the CPF, it’s on line 310. Otherwise, look for:

<input type="hidden" value="{{pageData.device.siteId}}">
  1. Change that line to:
<input type="hidden" name="site" value="{{pageData.device.siteId}}">

After saving the page, you’ll need to refresh the CPF browser tab, and then you should be able to submit the form.

Thanks for finding this issue!

1 Like

I don’t believe I am on the most recent version. For reference, the line I had to change on cpf-page-device-details was line 193. There are two sections with that line of code, one is for the system admin only, the other is for system users (line 193). Only modify the section labeled for system users.

To clarify for anyone else, there are two lines that look similar. One contains a customer ID and one contains a site ID. You’ll need to change the one containing the site ID.

<input type="hidden" value="{{pageData.device.siteId}}">

vs.

<input type="hidden" value="{{pageData.device.customerId}}">

The first one needs modified. Technically the customer field is also missing the name, but the workflow doesn’t look at that value since devices aren’t assigned to customers - only sites.

Thank you for clarifying, I completely overlooked that difference. At a quick glance, they look identical.