Boost
January 28, 2021, 5:52am
1
Hi,
Not sure what’s going on but my preview is not matching the browser view. I have Bootstrap 4 installed and the page type is content.
I also noticed there was no head or body in the code, but this comment was where the head should have been:
Code view:
Browser view:
Wappler view:
How do I fix this?
Teodor
January 28, 2021, 6:54am
2
What is this page you are trying to preview? Is it a content/include page? How did you set it up?
Boost
January 28, 2021, 7:32am
3
First, I started by creating main.ejs, which is a layout page. The only component I added on main.ejs is a brand menu right block. In the code, it also has the normal doctype, html, head, and body tags.
Next, I created register.ejs, which is a content page and the layout is main.ejs. After that, I started adding components to the register.ejs page. Register.ejs does not have the normal doctype, head, body tags, etc.
I noticed, every time I create a new content page with main.ejs as the layout, this is the only code that shows up:
When I create a new content page without a layout, I get the normal doctype, html, head, body layout
Teodor
January 28, 2021, 7:37am
4
Ok that is how it is supposed to be. Can you check your browser console for errors, when you preview the page in the browser?
Boost
January 28, 2021, 7:40am
6
I guess it’s a chrome extension?
Teodor
January 28, 2021, 7:42am
7
You can ignore the source .map warnings. So there are no other errors on the page - even if you reload it?
Boost
January 28, 2021, 7:43am
8
No, that’s the only error I’m getting in the console
Teodor
January 28, 2021, 7:49am
9
Can you provide a link to your page please?
Boost
January 28, 2021, 7:55am
10
It’s on localhost right now and I don’t have a website, so I I’ll try connecting it to a domain
Teodor
January 28, 2021, 7:56am
11
Have you tried restarting the server using the restart server button in Wappler bottom bar?
Boost
January 28, 2021, 8:04am
12
Just tried restarting the server and Wappler, and they didn’t do anything
Teodor
January 28, 2021, 8:10am
13
Does this happen with all your content pages?
Are the routes properly created in the routing panel?
Boost
January 28, 2021, 8:34am
14
The error occurs with all content pages that are connected to a layout page. Content pages without a layout page work normally and have the html tags.
Not sure if I set up routing properly, I never touched anything there but here’s some screenshots:
Teodor
January 28, 2021, 8:36am
15
Ah you are using docker? Have you deployed your site to your docker instance before previewing it in the browser?
Boost
January 28, 2021, 8:38am
16
Yes, I’m using docker. This green circle means that it was already deployed to docker, right?
Teodor
January 28, 2021, 8:39am
17
No, it means the target is active. Click the deploy button please and then preview in the browser.
Boost
January 28, 2021, 8:41am
18
Hmm, clicking the deploy rocket and refreshing didn’t work
Teodor
January 28, 2021, 8:43am
19
You are probably not doing something right, or something is not properly setup. Close Wappler, restart Docker desktop and restart both. Deploy again and check the results.
Boost
January 28, 2021, 9:11am
20
Just restarted my computer, wappler, and docker, and it’s still not working. I think it has something to do with the HTML, not showing up, right?