Redirect is messed up for me

Noob alert here:

I am following Hyperbytes' tutorial and I really can't get it to work to show the registration page. I am using Node.js .

When I finished the registration page and wanted to test it by accessing http://localhost:3000/register , all I saw was my start page. I never see the register page. I am stuck. I've been through the tutorial 5 times now and I can't see that I have done something wrong (but ofc I have, I just don't see with what)

I am using the built-in Wappler webserver, but I have placed the files elsewhere.

  • What is the default path to the files? I am on a Windows 10 PC
  • Is there and access-log and error log for the Wappler webserver?

Any hints would be greatly appreciated.

Can you check the Routes section to see if you're mistakenly loading the start page instead?

It doesn't look like there is anything wrong with the route. I think it looks like it should.

I tried something else. I changed the layout from "main" to "none", and then I got this. This worked, but the look & feel is lost.

image

But when I changed it back to main, it was the same again so I couldn't access it. Redirected to the start page.

(Oh and by the way, thank you for trying to help me!)

I think there's an issue with your main layout/template, can you show it? Probably you erased something that allows page-specific views (e.g. register) from being injected into it, and you might've treated it as a regular page instead of a main template, so you built an entire start page instead of a template

No problem!

Edit: I also think you're misusing the word "redirect", that's only when the browser's URL changes, but I also don't know the right word

<!doctype html>
<html>

<head>
  <base href="/">
  <script src="/dmxAppConnect/dmxAppConnect.js"></script>
  <meta charset="UTF-8">
  <title>Untitled Document</title>

  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
  <link rel="stylesheet" href="/css/style.css" />
  <script src="/dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>
  <link rel="stylesheet" href="/dmxAppConnect/dmxValidator/dmxValidator.css" />
  <script src="/dmxAppConnect/dmxValidator/dmxValidator.js" defer></script>
  <link rel="stylesheet" href="/dmxAppConnect/dmxNotifications/dmxNotifications.css" />
  <script src="/dmxAppConnect/dmxNotifications/dmxNotifications.js" defer></script>
  <script src="/dmxAppConnect/dmxBrowser/dmxBrowser.js" defer></script>
</head>

<body is="dmx-app" id="main">
  <div class="container">

    <div class="row">
      <div class="col">
        <h1 class="text-start">Main 1</h1>
      </div>
    </div>
    <div class="row">
      <div class="col-12"></div>
    </div>
  </div>
  <script src="/bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>

</html>

I checked another main and that looked very different, so I copied the content of that main.ejs and placed that into the current main.ejs and that changed things. The form was shown:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<!-- New Wappler Page -->
</head>
<body>
<div is="dmx-view" id="content">
  <%- await include(content, locals); %>
</div></body>
</html>

Now I lost the formatting so the registration page now looks like this when rendered:

image

There you have your problem! Your missing stuff!

You could replace whatever inside the body tags with that (on your main template before you replaced it)

1 Like

Wow! Yes, that was it!

THANK YOU!