Nodejs content page, top of page Wappler comments changed

In my nodejs project on my content page at the top is a comment with what seems to be important Wappler information, but have never really understood what purpose this serves since it is also mostly in the layout page head section in some form or another, and have never had any concerns around it until now when I was about to do a GIT commit and noticed this information on content page has changed considerably since yesterday, when nothing significant has changed on my page.

This is what GIT reports as having been deleted
<!-- Wappler include head-page="layouts/lt_auth" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="menu" appConnect="local" components="{dmxBootstrap5Navigation:{},dmxBootstrap5TableGenerator:{},dmxDataTraversal:{},dmxBootstrap5Alert:{},dmxBootstrap5Modal:{},dmxValidator:{},dmxFormatter:{},dmxStateManagement:{},dmxBootstrap5PagingGenerator:{},dmxBootstrap5Tooltips:{}}" -->

This what GIT reports as being added
<!-- Wappler include head-page="layouts/lt_auth" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="menu" appconnect="local" components="{dmxFormatter:{},dmxBootstrap5TableGenerator:{}}" -->

Note that the Bootstrap5TableGenerator chunk was also missing, but I reran the table generator to see if it would come back, which it did.

Does Wappler use this comment for anything, and should I be concerned that it has changed?

Wappler uses this information to identify dmx library scripts that need to be run on each content page. These scripts are added in layout pages depending upon the components in content pages. If you are missing these references to scripts in the components="" section, then that component on the content page will not work correctly.

For example, according to the second Wappler include section in your post, if you are using an alert on the content page, then it won't work correctly as it has been removed. To fix this, you can add Alert component again on the content page, which will add the dmx component reference on the content page and script in the layout page if missing.

I'm not sure why this head section has changed on the content page. May be Wappler is identifying the components that are required on the content page and removing the others.

Thank you for your response, what you say makes sense, however nothing seems to be broken.
This what is on top of my content page, and for instance my Bootstrap5 modal and alerts are still working, which doesn’t seem right then?

<!-- Wappler include head-page="layouts/lt_auth" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="menu" appconnect="local" components="{dmxFormatter:{},dmxBootstrap5TableGenerator:{}}" -->

This was my understanding. I have come across issues due to a missing dmx reference in the Wappler include head section. Perhaps it was mainly due to the missing dmx script in the layout page rather than the missing dmx reference in content page.

When a new component is added on a content page, Wappler adds a corresponding script in the layout page, if required. So, it seems as long as the script is available in the layout page, the same component should work correctly on all linked content pages. Some more clarification on this would definitely help.

Your understanding makes sense, and since Wappler goes through the trouble of actually creating the component comment on top of nodejs content page I would assume that it is doing something too.

However my testing shows otherwise

Agreed it would be good to gain some clarification on its purpose, but also why a chunk of my components are now missing as per GIT?

These components and frameworks are auto added to the comment section when added in App Structure - they are added there so the design view knows what components and frameworks are used and includes them for design.

1 Like

Thank you @teodor, that makes perfect sense.
Any thoughts as to why my content page may have lost a bunch of these components, some, but not all?