# When changing pages - things start reinitializing?

**URL:** <https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115>\
**Category:** General discussion\
**Created:** [July 29, 2024, 1:27am UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115 "2024-07-29T01:27:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkram53](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rkram53](https://forum.electra.one/u/rkram53)\
**Post date:** [July 29, 2024, 1:27am UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/1 "2024-07-29T01:27:41Z")

</div>

When I change from page to page it looks like there is some internal initializing that takes place (are things firing on me without asking?) that throws things all out of expected states? Exactly what happens internally when you change a page? How can you stop any unwanted re-initialization? Thanks.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [August 7, 2024, 9:26pm UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/2 "2024-08-07T21:26:31Z")

</div>

Page changes should not change anything. Very probably the issue is elsewhere. Did you give every parameter (within the same type) a different ID? Do you have the same parameter with the same type and ID on purpose on different pages?

---

<div class="post-metadata">

**Author:** ![rkram53](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rkram53](https://forum.electra.one/u/rkram53)\
**Post date:** [August 7, 2024, 11:29pm UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/3 "2024-08-07T23:29:30Z")

</div>

Yea might have been same id issue. That can be a problem as with MPE. The real issue is there is no global initialization function. OnLoad is called before other internal initialization. This to me is not a feature but a terrible bug that needs to be fixed. When I call Onload that should be the last thing done so any other initialization that is automatically performed can easily be overridden with the init params I want vs. trying to create some silly flags to keep things from being initialized without my intent. The software would be so nice if this was done to make things totally predictable for initialization.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [August 9, 2024, 4:07pm UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/4 "2024-08-09T16:07:58Z")

</div>

Not sure what you mean. You 'll have to be specific about what values in what code for what synth/device you see changed in a way that is not predictable, for the community to help you, I’m afraid.

---

<div class="post-metadata">

**Author:** ![rkram53](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rkram53](https://forum.electra.one/u/rkram53)\
**Post date:** [September 9, 2024, 1:02am UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/5 "2024-09-09T01:02:25Z")

</div>

Well it looks like when I change a page, control #1 is being called or some strange reason.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [September 10, 2024, 6:30am UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/6 "2024-09-10T06:30:27Z")

</div>

When pages are switched, the only callback called is `pages.onChange()`. All other callbacks related to controls are driven by the value changes. In order to help, I’d need to see the preset.

---

<div class="post-metadata">

**Author:** ![rkram53](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rkram53](https://forum.electra.one/u/rkram53)\
**Post date:** [September 10, 2024, 1:37pm UTC](https://forum.electra.one/t/when-changing-pages-things-start-reinitializing/3115/7 "2024-09-10T13:37:45Z")

</div>

Thanks. Let me see if I can create a simple version that does this. I’m not directly calling pages.onChange.
