Website only show's data from content field. Nothing else, no template, no html, no images, no css [SOLVED]

Thanks Nuan88, the tags is closed in the footer.

Keep in mind, i’m using some HTML for multiple domeins using if statements.

Header

<!DOCTYPE html>
<html lang="nl">
	<head>

		<!-- =================================== -->
		<!-- 		  COMPATIBILITY 			 -->
		<!-- =================================== -->
		
		<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	

		<!-- =================================== -->
		<!-- 			  TITLE 			 	 -->
		<!-- =================================== -->

		<title>[[*pagetitle]] | [[++site_name]]</title>

		<!-- =================================== -->
		<!-- 			MORDERNIZR 			 	 -->
		<!-- =================================== -->

		<script src="assets/js/modernizr.js"></script>
		
		<!-- =================================== -->
		<!-- 			  STYLES 				 -->
		<!-- =================================== -->
		
		<!-- BOOTSTRAP MIN -->
		<link href="/assets/css/bootstrap.min.css" rel="stylesheet" />
		
		<!-- MEDIA ELEMENT -->
		<link href="/assets/css/mediaelementplayer.min.css" rel="stylesheet" />
		
		<!-- MAGNIFIC POPUP CSS -->
		<link href="/assets/css/magnific-popup.css" rel="stylesheet" />
		
		<!-- THEME CSS -->
		<link href="/assets/css/style.css" rel="stylesheet" />
		[[++http_host:is=`racereporter.nl`:then=`
		<link href="/assets/f1podcast/css/custom.css" rel="stylesheet" />
		`:else=`
		<link href="/assets/css/custom.css" rel="stylesheet" />
		`]]

		
		<!-- GOOGLE FONTS -->
		<link href='//fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
		<link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300' rel='stylesheet' type='text/css'>
		
		<!-- FONT AWESOME -->
		<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" /> <!-- old skool -->
		<script src="https://kit.fontawesome.com/1b0c90f9f6.js"></script> <!-- new skool -->
		
		<!-- =================================== -->
		<!-- 		 	THEME COLOR 			 -->
		<!-- =================================== -->
		
		<meta name="theme-color" content="#fff" />
		
		<!-- =================================== -->
		<!-- 			CONDITIONAL 			 -->
		<!-- =================================== -->
		
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
			<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
		<![endif]-->

		<!-- =================================== -->
		<!-- 			 VIEWPORT 				 -->
		<!-- =================================== -->

		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" />

		<!-- =================================== -->
		<!-- 			  AUTHOR 				 -->
		<!-- =================================== -->

		<meta name="author" content="Lucas Degen" />
		<meta name="reply-to" content="lucas@[[++http_host]]" />
		<meta name="DC.publisher" content="Lucas Degen" />

		<!-- =================================== -->
		<!-- 			 CONTENT 				 -->
		<!-- =================================== -->

		<meta name="description" content="[[*description]]" />

		<!-- =================================== -->
		<!-- 			 ROBOTS 				 -->
		<!-- =================================== -->

		<meta name="GOOGLEBOT" content="INDEX, FOLLOW" />
		<meta name="robots" content="index, follow">
		<meta name="msnbot" content="NOODP" />

		<!-- =================================== -->
		<!-- 			 FACEBOOK 				 -->
		<!-- =================================== -->

		<meta property="og:locale" content="nl" />
		<meta property="og:type" content="website" />
		<meta property="og:title" content="[[*pagetitle]]" />
		<meta property="og:description" content="[[*description]]" />
		<meta property="og:url" content="[[++site_url]]" />
		<meta property="og:site_name" content="[[++site_name]]" />
		<meta property="og:image" content="/assets/[[++cultureKey]]/img/facebook-og.jpg" />

		<!-- =================================== -->
		<!-- 			  TWITTER 				 -->
		<!-- =================================== -->

		<meta name="twitter:card" content="summary" />
		<meta name="twitter:site" content="[[++site_url]]" />
		<meta name="twitter:creator" content="[[++social_url_twitter]]" />
		<meta name="twitter:title" content="[[*pagetitle]]" />
		<meta name="twitter:description" content="[[*description]]" />
		<meta name="twitter:domain" content="[[++site_name]]" />
		<meta name="twitter:image" content="/assets/[[++cultureKey]]/img/twitter-og.jpg" />

		<!-- =================================== -->
		<!-- 			  FAVICON 				 -->
		<!-- =================================== -->
		
		<link rel="icon" href="/assets/[[++cultureKey]]/favicon.png" />
		<link rel="shortcut icon" href="/assets/[[++cultureKey]]/favicon.png" />
		
		<link rel="alternate" type="application/rss+xml" title="RSS feed afleveringen" href="[[~22]]" />

		[[$header-trackingcode]]

	</head>

	<body itemscope itemtype="http://schema.org/WebSite">
		
		<!-- ===== HEADER ===== -->
		<header class="header sticky scrolling" itemscope itemtype="http://schema.org/Organization">
<!--		<header class="header[[++site_start:is=`[[++site_start]]`:then=``:else=` sticky scrolling`]]" itemscope itemtype="http://schema.org/Organization"> -->
			<div class="container">
			
				<!-- ===== LOGO ===== -->
				<h1 class="logo"><a href="/"><img itemprop="logo" src="/assets/img/logo-[[++http_host]].png" alt="[[++site_name]]" title="[[++site_name]]" /></a></h1>
				
				<!-- ===== NAVIGATION ===== -->
				<nav class="navigation">
					<!-- ===== MENU ===== -->
					
<!-- https://docs.modx.com/extras/revo/wayfinder/wayfinder-introductory-examples -->

					<ul class="menu">
						<li class="menuitem active"><a href="/[[~150]]">Home</a></li>
						<li class="menuitem dropdown">
							<a href="/[[~27]]">Afleveringen</a>
							<ul class="droplist">
								<li class="droplist-item"><a href="/[[~139]]">2019</a></li>
								<li class="droplist-item"><a href="/[[~41]]">Specials</a></li>
							</ul>
						</li>
						<li class="menuitem"><a href="/[[~101]]">Kalender</a></li>
						<li class="menuitem dropdown">
							<a href="/standen/">Standen</a>
							<ul class="droplist">
								<li class="droplist-item"><a href="/[[~107]]">Rijders</a></li>
								<li class="droplist-item"><a href="/[[~108]]">Teams</a></li>
							</ul>
						</li>

						<li class="menuitem dropdown">
							<a href="#">F1 Podcast</a>
							<ul class="droplist">
								<li class="droplist-item"><a href="/[[~40]]">Wat is podcast?</a></li>
								<li class="droplist-item"><a href="/[[~132]]">Achtergrond</a></li>
								<li class="droplist-item"><a href="/[[~54]]">Podcast apps</a></li>
								<li class="droplist-item"><a href="/[[~38]]">Contact</a></li>
								<li class="droplist-item"><a href="typography.html">Typography</a></li>
								<li class="droplist-item"><a href="single-page.html">Single Page</a></li>
								<li class="droplist-item"><a href="404.html">404</a></li>
							</ul>
						</li>
						<!-- <li class="menuitem"><a href="[[~132]]">Achtergrond</a></li> -->
						<!-- <li class="menuitem"><a href="[[~38]]">Contact</a></li> -->
					</ul>


					<!-- ===== HAMBURGUER ICON ===== -->
					<a href="#" class="btn-hamburguer-menu"><i class="fa fa-bars"></i></a>
				</nav>
				
			</div>
		</header>

Footer

		<!-- ===== FOOTER ===== -->
		<footer class="footer">
			
			<!-- ===== FOOTER CONTENT INFORMATION ===== -->
			<section class="section-positive">
				<div class="container">
					
					<div class="row mt-70 mb-30">
					
						<!-- ===== PODCASTS EPISODES ===== -->
						<div class="col-sm-3 mb-40">
							<h2 class="title-separator white">Afleveringen</h2>
							<ul class="footer-complement">
								[[!getResources? &parents=`139` &limit=`3` &sortdir=`ASC` &tpl=`footer-recente-afleveringen`]]
							</ul>
						</div>

						<!-- ===== SITEMAP ===== -->
						<div class="col-sm-3 mb-40">
							<h2 class="title-separator white">Sitemap</h2>
							<ul class="footer-list">
[[++http_host:is=`racereporter.nl`:then=`
								<li><a href="/[[~150]]">Home</a></li>
								<li><a href="/[[~27]]">F1 Afleveringen</a></li>
								<li><a href="/[[~41]]">F1 Specials</a></li>
								<li><a href="/[[~40]]">Wat is Podcast?</a></li>
								<li><a href="/[[~54]]">Luister apps</a></li>
								<li><a href="/[[~39]]">Achtergrond</a></li>
`:else=`
								<li><a href="/">Home</a></li>
								<li><a href="/afleveringen">Afleveringen</a></li>
								<li><a href="/watispodcast/">Wat is Podcast?</a></li>
								<li><a href="/achtergrond/">Achtergrond</a></li>
								<li><a href="/contact/">Contact</a></li>
`]]

							</ul>
						</div>

						
						<!-- ===== PODCASTS LINKJES ===== -->
						<div class="col-sm-3 mb-40">
							<h2 class="title-separator white">[[++http_host:is=`racereporter.nl`:then=`Meer F1`:else=`Vrienden`]]</h2>
							<ul class="footer-complement">

[[++http_host:is=`racereporter.nl`:then=`


								<li>
									<a target="_blank" href="https://basvanbodegraventickets.nl">Bas van Bodegraven reizen</a>
									<span>basvanbodegraventickets.nl</span>
								</li>
								<li>
									<a target="_blank" href="https://gptoday.net/nl/">GP Today</a>
									<span>gptoday.nl</span>
								</li>
								<li>
									<a target="_blank" href="https://nl.motorsport.com/f1/">motorsport.com</a>
									<span>nl.motorsport.com/f1/</span>
								</li>
								<!--<li>
									<a target="_blank" href="https://formule1awards.nl">formule1awards.nl</a>
									<span>formule1awards.nl</span>
								</li>-->

`:else=`


								<li>
									<a href="#">Wijn podcast</a>
									<span>wijnpodcast.nl</span>
								</li>
								<li>
									<a href="#">Jopen bier</a>
									<span>jopenkerk.nl</span>
								</li>
								<li>
									<a href="#">biernetwerk</a>
									<span>biernetwerk.nl</span>
								</li>

`]]
							</ul>
						</div>
						
						<!-- ===== SOCIAL CONNECTION  & APPS ===== -->
						<div class="col-sm-3 mb-40">
							<h2 class="title-separator white">Luister via</h2>
							<ul class="social-list">
								<li class="social-item"><a href="[[++podcast_url_apple]]" target="_blank"><i class="fab fa-apple"></i></a></li>
								<li class="social-item"><a href="[[++podcast_url_spotify]]" target="_blank"><i class="fab fa-spotify"></i></a></li>
								<li class="social-item"><a href="[[++podcast_url_castbox]]" target="_blank"><i class="fas fa-water"></i></a></li>
								<li class="social-item"><a href="[[++podcast_url_podnl]]" target="_blank"><i class="fas fa-microphone"></i></a></li>
							</ul>

							<h2 class="title-separator white">socials</h2>
							<ul class="social-list">
								<li class="social-item"><a href="[[++social_url_facebook]]" target="_blank"><i class="fab fa-facebook"></i></a></li>
								<li class="social-item"><a href="[[++social_url_instagram]]" target="_blank"><i class="fab fa-instagram"></i></a></li>
								<li class="social-item"><a href="[[++podcast_url_twitter]]" target="_blank"><i class="fab fa-twitter"></i></a></li>
								<li class="social-item"><a href="[[++social_url_youtube]]" target="_blank"><i class="fab fa-youtube-square"></i></a></li>
							</ul>
						</div>
						
					</div>
					
				</div>
			</section>
			
			<!-- ===== FOOTER INFORMATION ===== -->
			<section class="footer-credits">
				<div class="container">
					
					<div class="row">
						
						<!-- ===== CREDIT LOGO ===== -->
						<div class="col-sm-6 footer-logo">
							<h2><a href="index.html"><img src="/assets/img/logo-[[++http_host]].png" alt="[[++site_name]]" title="[[++site_name]]"></a></h2>
						</div>
						
						<!-- ===== CREDIT LOGO ===== -->
						<div class="col-sm-6 text-right">
							[[++site_name]] | [[++http_host:is=`racereporter.nl`:then=`2016 - 2019`:else=`2019`]] | Alle rechten voorbehouden
						</div>
						
					</div>
					
				</div>
			</section>
			
		</footer>
		
		<!-- =================================== -->
		<!-- 			  SCRIPTS 				 -->
		<!-- =================================== -->
		
		<!-- JQUERY -->
		<script src="/assets/js/jquery-1.11.min.js"></script>
		
		<!-- BOOTSTRAP JS -->
		<script src="/assets/js/bootstrap.min.js"></script>
		
		<!-- MEDIA ELEMENT -->
		<script src="/assets/js/mediaelement-and-player.min.js"></script>
		
		<!-- MAGNIFIC POPUP -->
		<script src="/assets/js/magnific-popup.min.js"></script>
		
		<!-- FORM VALIDATE -->
		<script src="/assets/js/validate.min.js"></script>
		
		<!-- PLACEHOLDER FOR IE -->
		<script src="/assets/js/placeholder.min.js"></script>
		
		<!-- THEME JS -->
		<script src="/assets/js/main.js"></script>

	</body>

</html>

So are there content tags in there or no? Footer, header all not showing?

What precisely is showing and what is not?

I would definitely, definitely cut up that header into head chunk and header chunk, and pull the body open into the main part of the tpl with header chunk beneath that. Same for the footer, the body and html closings should be out of the footer.

Its really better to have the code in the right places, even though it should work no matter what. First off its easier to see, and it just could lead to problems otherwise

I also do not see the main div closed in the footer, its almost certainly some stray old code, you don’t even have anything in there. Either that or close it in the tpl, its definitely not closed.

I ran your code through an html scan, and there are a lot of errors. The meta tags seem to have errors, and your body opening has some problems there, what’s the website link there for?

Have you done a “view source” on a working page and pasted what you see into the W3C Validator?

Like nuan88, I find that it’s a lot easier to get valid HTML and maintain it if your Template itself is valid HTML containing all the necessary tags. Something like this:

<!DOCTYPE html>
<html lang="nl">
	<head>
          <title>MySite</title>
          <meta charset="utf-8">
          <!-- [[$header]] -->
        </head>

       <body>
          <!-- [[*content]] -->
          <!-- [[$footer]] -->
       </body>
      
</html>

That way, you don’t have to worry about whether those tags are opened and closed properly. The MODX tags confuse the validator, which is why they’re in comments until it passes validation.

Here’s another thing to try if you have a public site in addition to the localhost one. Paste the URL into the first input box here. Leave the other inputs at their defaults, and click on the “Submit Request” button. Look for any extraneous characters in the page output, which could suggest a character encoding issue.

1 Like

BobRay, how does it work with those comments? Are they intended to be simply examples, or does the system still parse them? I am a little unclear about those

They won’t work as written. The comment tags are necessary to please the validator. After validation they need to be removed.

When the page is finished and working, you need to do a “view source” as I suggested and paste that into the validator for a final check.

1 Like

Here is the URL for the development site, it’s valid HTML according to W3C.

Still, pages https://racereporter.nl/afleveringen/2019/ and https://racereporter.nl/specials/ render only what is in the content field, without rendering the outside template.

Ah I understand what’s going on, you seem to be giving us the rendered page source, when what we want is the actual code from your template.

Are the broken pages using a different template?

Nice looking page, btw

Thanks you, I love this design. Yes the broken pages use different templates. One for specials and one for episodes. But specials is a copy of the episode one.

By the way, I’ve send you the onrendered source, since the whole problem is, there is no HTML is the rendered source.

I did as told and added tags like this.

<!DOCTYPE html>
<html lang="nl">
	<head>
          [[$f1-head]]
        </head>

       <body itemscope itemtype="http://schema.org/WebSite">
          [[$f1-header]]
          [[*content]]
          [[$f1-footer]]
       </body>
      
</html>

I added this in the content field

		<!-- ===== LASTEST PODCAST (HERO) ===== -->
		<section class="podcast-hero" style="background-image: url(//images.racereporter.nl/f1podcast/2019/rbcontentpool/baku/AP-1Z5QSF8ED2511_news.jpg); background-size: cover; background-attachment: inherit; background-position: center center;">
			<div class="podcast-hero-inner">
			
				<!-- ===== PODCAST INFO ===== -->
				<div class="container">
						<div class="podcast-hero-content">
						<h2 class="podcast-hero-title">[[*pagetitle]]</h2>
						[[*introtext]]
					</div>
				</div>
				
				
			</div>
		</section>
		
		<!-- ===== MAIN ===== -->
		<main id="main" class="main">
			
			<!-- ===== PODCAST LIST ===== -->
			<section id="#episodes" class="section-positive">
				<div class="container">
					
					<!-- ===== SECTION TITLE ===== -->

					
					<div class="row">
					
						[[!getResources? 
							&parents=`41` 
							&limit=`10` 
							&sortdir=`DESC` 
							&tpl=`homepage-podposts-boxed` 
							&isTV=`5` 
							&includeTVs=`5`
							&tvFilters=`sticky==Yes`
							&tvFilters=`sticky==No`
&idx=`[[+idx]]`
						]]


			
						<!-- ===== PAGINATION ===== -->
<!-- https://docs.modx.com/extras/revo/getpage ** plugin installed -->
						<div class="col-sm-12 text-center mb-50">
						</div>
						
					</div>
					
				</div>
			</section>

Then I do a clear cache in MODX and the private Firefox browser does not render the header / footer.

It only renders what I put in the content field of the specials page.

1 Like

Ok I understand much better now.

I think in all likelihood the problem will be found in the header and footer code…is the head code going through? Ah I see the specials page is now working!! It looks great too!! Very nice styles!

1 Like

Now here is the problem… Open a private browser and op racereporter.nl/afleveringen and racereporter.nl/specials/ It is not rendering the header or footer. The same problem over and over again. Only loading what is in the content field…

I see it now, private browser or no. And now both pages dont look right at all

Ok, we have two ways I think to deal with this. First is, can you check the console in your browser, it should record if anything can’t be accessed. When you load that page, it should go to try and get the chunk, its possible that there is a permissions problem or…something.

I also think the head chunk is not getting processed, as I have no styling for services now…but you had it a couple hours ago, it looked great

So, second why not paste the header code here, after checking the console. If there’s an error then the code isn’t the issue. Header and footer, they should render…they are the same chunks in both templates?

Also a general rule with debugging and fixing is to slow down and document your changes, its tough to do honestly, but it will save you time.

When you check the /specials/ page in a private browser, it show you the same on my private browser. It is not loading the header chunk or footer chunk at some time. I checked everything over and over again.
In the Console, I see no warnings of errors.

On moment it works, then I make a change in the code in the CMS, I do a clear cache and the problem pops up again. I looked at Access Control Lists what Mark H. tot me to do. Nothing I change will fix this problem. I don’t know where to look.

1 Like

The server error log:
[Tue Jun 11 23:38:33.044699 2019] [authz_core:error] [pid 2537128:tid 140273035937536] [client 2a0b:7280:200:0:4ab:88ff:fe00:d72:48662] AH01630: client denied by server configuration: /****/private_html/core/docs/changelog.txt

1 Like

That doesn’t look relevant to me, but it seems you’ve got some sort of files obviously in a non-public part of your site.

This could be permissions or your paths in the config files on the server, I guess with client denied its permissions, that ‘server configuration’ message seems to be Apache specific

Let’s see what others say tomorrow. The system is telling me to chill lol

1 Like

Here’s something else to try. Create a new user who is a sudo user (check the sudo box).

Create a new page in the front end containing the Login snippet put a couple links on that page to the problem pages. Log in as that new user on the login page and then use the links to go to the problem pages. If they look all right, it’s a MODX permissions issue. If not, it’s something else.

2 Likes

Debugging is tough. Go slow pls. You’ve got this :slight_smile:

1 Like

Thanks Bob, I did just that.

~DONT POST SUDO CREDENTIALS PUBLICLY

Error pages still broken. Very exotic what this problem could be, it cracks my head.

UPDATE 13:17
It has to do something with /afleveringen & /specials. Thoose URL gave the error after clearing cache.
The child pages did work… Wierd.
What I did now is focus on another container. The F1 Circuits. It was set unpublished and set it to published. And a miracle happened. I can not break the pages anymore… I can clear the cache whatever I want. The pages seems te be loading fine…

13:33 No the afleveringen page gave the error again

What could possibly go wrong by publicly posting sudo user credentials…

I’ve edited your post, changed the password on that user account, and flushed sessions on your site.

2 Likes