# self.page.props.pageId not resolving correctly?

**URL:** <https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664>\
**Category:** Ignition Early Access\
**Created:** [June 15, 2020, 4:48pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664 "2020-06-15T16:48:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [June 15, 2020, 4:48pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/1 "2020-06-15T16:48:58Z")

</div>

Afternoon

We have noticed that since updating to V8.0.13, any popup using “self.page.props.pageId” seems to resolve to “1af10a27” rather than the passed id.

Is this known or just us?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 15, 2020, 5:14pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/2 "2020-06-15T17:14:20Z")

</div>

Are you in the Designer? The Designer has absolutely no concept of “Page” because you only ever see Views. In the Designer, references to the `pageId` property from anywhere result in a reference to the Designer. Active Sessions do return the correct Page ID associated with the open tab.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 15, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/3 "2020-06-15T17:52:15Z")

</div>

While attempting to replicate this, I tried the following setup:  
On a View whihc is the primary View in use for a Page, I placed a Button component with the following code in a Script Action tied to an onClick Event:

```auto
system.perspective.togglePopup(id='A',view='Experimentation/Repl',params={id:self.page.props.pageId})

```

The `id` param is used by a secondary View which has a param with a key of `id` and a Label whose text is bound to `self.view.params.id` (and also an Icon)

After clicking my button, I encountered the following expected behavior in an active Session:  
 ![Screen Shot 2020-06-15 at 10.50.18 AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/023bd4f49af977a1aa73aa223f56d3cf71af472d.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [June 15, 2020, 6:23pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/4 "2020-06-15T18:23:57Z")

</div>

Thanks for your response, I understand

Prior to version 8.0.13 we have been successfully using the following to close popups

```auto
popupID = self.page.props.pageId

system.perspective.closePopup(popupID)

```

This seems to be an incorrect usage, confusing pageId with the popup id,

I guess we have just been fortunate until now.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 15, 2020, 6:34pm UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/5 "2020-06-15T18:34:36Z")

</div>

Ah, okay, so the likely cause for what you’re encountering is a fix that went into 8.0.13.

Before 8.0.13, if closePopup or togglePopup was supplied an `id` argument which didn’t match any open popup, then Perspective closed the most recently focused Popup. In the event `self.page.props.pageId` did not match the id of the popup you had open, but that popup was the most recently focused popup, it still would have been closed.

Many users limped along on this bug without realizing it because most users only have one popup open at a time. For users who have more than one popup, this behavior was wreaking havoc with their projects.

8.0.13 has changed this behavior so that if the supplied `id` is not found no action is taken. We also realize that some uses prefer the option to perform a sort of “blind” close operation, and so if an empty string is supplied for the `id arg, then the old behavior is used.

You can probably get back to your previous behavior by changing your close operation to the following:

```auto
system.perspective.closePopup("")

```

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [June 17, 2020, 10:05am UTC](https://forum.inductiveautomation.com/t/self-page-props-pageid-not-resolving-correctly/35664/6 "2020-06-17T10:05:03Z")

</div>

OK, thanks for the clarification.
