Strange NULL div

Hi all,

I recently put up a website and as soon as it was online a strange div called #text containing the word “NULL” appeared above my header. The strange thing is that it also shows up in my panel, under the black dashboard header. Any ideas where it may come from and how to get rid of it? Sorry if the question isn’t kirby specific, but I thought to post it here since it also shows in the panel and maybe it’s some sort of issue?

Here is my header code:

<!doctype html>
<html lang="<?= site()->language() ? site()->language()->code() : 'en' ?>">
<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">


  <?php echo css('@auto') ?>
  <?php echo css('assets/css/header.css') ?>

</head>

<body>

  <div class="header">
      <div id="name">

But does it disappear if you remove the header? This doesn’t seem to come from the header code. Do you use any plugins? Any custom code anywhere?

you are right - it doesn’t disappear if I remove the header. I didn’t use any plugins or any js. What do you mean by custom code? This is the homepage code as example

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <?php snippet('header') ?>
<?php echo css('assets/css/default.css') ?>

<div class="homebody">


    <div class="homefeatured">

        <a href="<?= url("work") ?>">
          <div class="featuredimage">
          <?php echo $page->images() ?>
        </div>
      </a>


          <div id="featuredtext">
          <p2> <a href="<?= url("work") ?>"> <?php echo $page->text1()->kirbytext() ?> </a> </p2>
        </div>


    </div>

</div> <?php snippet('footer') ?>

out of desperation I even tried

#text {
display: none;
}

Why is that? Either way, I changed that and the thing is still there…

Well, your document should start with the doctype definition <!doctype html>.

https://www.w3.org/TR/html401/struct/global.html

And why <p2>?

What is in your footer?

No JS anywhere at all?

Does it also happen in another browser?

No js at all

p2 so that I can can keep it consistent with all the p2 in the site, I have h1, p and p2. More for my personal organization I guess. Why?

Happens in all browsers and in the panel too

Here is my footer:

<?php echo css('assets/css/footer.css') ?>
<div id="copyright">
  <h1>© 2019 </h1>
</div>
<div id="madeby">
  <h1>blah blah</h1>
</div>

What about your config.php?

<?php

/*

---------------------------------------
License Setup
---------------------------------------

Please add your license key, which you've received
via email after purchasing Kirby on http://getkirby.com/buy

It is not permitted to run a public website without a
valid license key. Please read the End User License Agreement
for more information: http://getkirby.com/license

*/

c::set('license', 'put your license key here');

c::set('debug', true);

var_dump($page);

/*

---------------------------------------
Kirby Configuration
---------------------------------------

By default you don't have to configure anything to
make Kirby work. For more fine-grained configuration
of the system, please check out http://getkirby.com/docs/advanced/options

*/

Please remove your var_dump($page), $page is not defined in the config, anyway. That should explain the NULL

1 Like

ahhhh there you go. Thank you so so much!

But check the order of your elements:

<html><head></head>
<body>NULL
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="http://domain.com/assets/css/header.css">  
  
  <div class="header">
  </div>
  
<link rel="stylesheet" href="http://domain.com/assets/css/default.css">
<div class="homebody">

</div>

</body></html>

This doesn’t look good.