Load even on content pages doesn’t work

So i’ve moved my project over to nodejs (see my other posts were all issues in php) and I am trying to add a dynamic event to the app on page load. When choose + > Load everything related DMX disappears and i’m left with the paragraph element i had on the page and the button. I can do CTRL Z to fix it but as soon as I try to add it back the same thing happens over again. Screenshots of before and after:
Before i try to add the on load event:

After:

Is the linux version just this buggy?

Can you post a screenshot showing what button in the UI exactly do you click?

Load under Dynamic Events > App

image

The dynamic events for App are not available for NodeJs content pages, but this should not break the App Structure.
Can you check what’s changed on the content page code when you try to add this event?

When you say content page, you mean the actual webpage content?

This doc will explain what a content page is and does

so yeah… the elements of the page i’ve created.

A Content Page is a type of page, both layout and content pages have elements on them

Here is a example of my index page which is a content page, that connects to my header which is a layout page.

This is so that you can have common elements for example a nav bar and footer in the layout page and in the content page is the general page content.

before i click to add an on load event, this is at the top of the code in the wappler comment.
<!-- Wappler include head-page="layouts/main" id="index" components="{dmxBrowser:{}}" jquery_slim_35="local" fontawesome_4="local" bootstrap4="local" bootstrap_icons="local" is="dmx-app" appConnect="local" -->

after i click it becomes:
<!-- Wappler include head-page="layouts/main" id="index" components="{dmxBrowser:{}}" jquery_slim_35="local" fontawesome_4="local" bootstrap4="local" bootstrap_icons="local" is="dmx-app" dmx-on:load="" -->

that’s the only change.

That’s strange, adding the dynamic App events on a content page should not do anything like that, and also not remove the appConnect="local" part.

Does this happen on a specific content page only? What if you create a new empty one and try the same?

Following the same sequence on another content page in the project doesn’t do anything.

This started because I have a security restrict on a server action in the content page we’ve been talking about (index.ejs). However it’s not working properly either. It should redirect me to /login but it’s doing nothing. How I discovered this was trying to figure out why the security restrict wasn’t work so I thought i’d try the on load event under dynamic events. Then I found this and thought it was odd… I didn’t know you couldn’t use that in a nodejs project.

not sure if this extra information helps or not.

There are no onload events for the content pages. You can use this on the main page.

1 Like