Hi,
I am getting this in my log messages:

Notice: Undefined variable: unpublished in include() (line 12 of /home/.../templates/node.tpl.php)

Not critical, theme is working fine, but the log messages is full of the above Notice

Thanks

CommentFileSizeAuthor
#6 errorlog2.png35.5 KBhectorplus
#6 errorlog1.png49.9 KBhectorplus

Comments

hectorplus created an issue. See original summary.

pifagor’s picture

Status: Active » Needs work

You can describe the problem in more detail? Provide screenshots?

kevinquillen’s picture

Yes, can you include the code in your node.tpl.php please, and the file path it is pointing at?

pifagor’s picture

Status: Needs work » Needs review

Write please as to reproduce the error, more detailed, preferably with screenshots

pifagor’s picture

Status: Needs review » Needs work
hectorplus’s picture

StatusFileSize
new49.9 KB
new35.5 KB

This is the code in my node.tpl.php
As far as i know, it has not been changed.

I have attached some screenshots

<article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>

  <?php print render($title_prefix); ?>
  <?php if (!$page): ?>
    <?php if (!$page): ?>
      <h2<?php print $title_attributes; ?>>
        <a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
    <?php endif; ?>
  <?php endif; ?>
  <?php print render($title_suffix); ?>

  <?php if ($display_submitted): ?>
    <div class="posted">
      <?php if ($user_picture): ?>
        <?php print $user_picture; ?>
      <?php endif; ?>
      <?php print $submitted; ?>
    </div>
  <?php endif; ?>

  <?php
  // We hide the comments and links now so that we can render them later.
  hide($content['comments']);
  hide($content['links']);
  hide($content['field_tags']);
  print render($content);
  ?>

  <?php if (!empty($content['field_tags']) && !$is_front): ?>
    <?php print render($content['field_tags']) ?>
  <?php endif; ?>
	
  <?php print render($content['links']); ?>
  <?php print render($content['comments']); ?>

</article>
senpAi95’s picture

did you find any solution for that?

hongpong’s picture

@senpAi95 i would suggest using
if (isset($display_submitted['unpublished'])) { .. do something to avoid }
while seeing if perhaps unpublished is an object in $display_submitted which I would hastily assume it is.