Hi! Suddenly the content of my pages (content-type page) are not showing. Only the title is showing. When I am logged in (I am user #1) I see the "view" and "edit" options. It still only shows the title and not the content. When clicking on /edit, everything looks normal and my content is there. Somehow it is not displayed.
Everything else (other content types and views) is displaying fine. Also it was working fine as of yesterday! Nobody seems to have changed anything since.
I first thought of permissions, but they look fine, and also being the main user, that is not relevant...
Anybody ever had the same problem? I looked into everything I could think of (menus settings, full html, publishing options...). Any suggestions would be welcome.
Thanks!

Comments

nevets’s picture

A link to the site would help but it sounds like someone had changed the template for that content type.

bastoubach’s picture

nevets’s picture

How about a link to something that's not displaying properly :)

bastoubach’s picture

here is a link to what's not displaying properly: http://fieldworkproject.com/location

And something that may be where the problem is. I changed something in the node.tpl.php file yesterday. I thought that was earlier in the day, but it may have been later and I did not check if the content-type page worked... http://drupal.org/node/505632

Thanks for the help. Much appreciated!

nevets’s picture

Your change is the likely source of the problem, you could post the code here (remember to place between <code> and </code> tags)

bastoubach’s picture


<?php if ($submitted && !$sticky ): ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
      <?php endif; ?>
      
      <?php if ($terms): ?>
        <div class="terms terms-inline"><?php print t(' in ') . $terms; ?></div>
      <?php endif; ?>
    </div>
  <?php endif; ?>

If it can help, this is a sub-theme based on Zen, so it is the Zen node.tpl.php file to start with.
Also I was trying to hide the "submitted by" from the sticky post of introduction on the front page. And I still want to do that.

nevets’s picture

It is hard to say from that little part, my guess is you have a syntax error or have an 'endif' in the wrong place.

bastoubach’s picture

Here is the entire thing. Thank you so much for looking into it.


<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"><div class="node-inner">

  <?php print $picture; ?>

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

  <?php if ($unpublished): ?>
    <div class="unpublished"><?php print t('Unpublished'); ?></div>
  <?php endif; ?>

  <?php if ($submitted or $terms): ?>
    <div class="meta">
 
   
      

      

  <div class="content">
    <?php print $content; ?>
  </div>

<?php if ($submitted && !$sticky ): ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
      <?php endif; ?>
      
      <?php if ($terms): ?>
        <div class="terms terms-inline"><?php print t(' in ') . $terms; ?></div>
      <?php endif; ?>
    </div>
  <?php endif; ?>

  <?php print $links; ?>

</div></div> <!-- /node-inner, /node -->

And here is the original file from the zen theme


<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"><div class="node-inner">

  <?php print $picture; ?>

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

  <?php if ($unpublished): ?>
    <div class="unpublished"><?php print t('Unpublished'); ?></div>
  <?php endif; ?>

  <?php if ($submitted or $terms): ?>
    <div class="meta">
      <?php if ($submitted): ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
      <?php endif; ?>

      <?php if ($terms): ?>
        <div class="terms terms-inline"><?php print t(' in ') . $terms; ?></div>
      <?php endif; ?>
    </div>
  <?php endif; ?>

  <div class="content">
    <?php print $content; ?>
  </div>

  <?php print $links; ?>

</div></div> <!-- /node-inner, /node -->

I really want to take a php training asap! :)

nevets’s picture

Ok, I see the problem, you moved the printing of $content above the submitted information and terms but make it conditional on $submitted or $terms.
Changing just when $submitted prints would get you this

<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"><div class="node-inner">

  <?php print $picture; ?>

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

  <?php if ($unpublished): ?>
    <div class="unpublished"><?php print t('Unpublished'); ?></div>
  <?php endif; ?>

  <?php if ($submitted or $terms): ?>
    <div class="meta">
      <?php if ($submitted && !$sticky): ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
      <?php endif; ?>

      <?php if ($terms): ?>
        <div class="terms terms-inline"><?php print t(' in ') . $terms; ?></div>
      <?php endif; ?>
    </div>
  <?php endif; ?>

  <div class="content">
    <?php print $content; ?>
  </div>

  <?php print $links; ?>

</div></div> <!-- /node-inner, /node -->

If you meant to also move $content above $submitted and $terms you might try

<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"><div class="node-inner">

  <?php print $picture; ?>

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

  <?php if ($unpublished): ?>
    <div class="unpublished"><?php print t('Unpublished'); ?></div>
  <?php endif; ?>

  <div class="content">
    <?php print $content; ?>
  </div>

  <?php if ($submitted or $terms): ?>
    <div class="meta">
      <?php if ($submitted && !$sticky): ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
      <?php endif; ?>

      <?php if ($terms): ?>
        <div class="terms terms-inline"><?php print t(' in ') . $terms; ?></div>
      <?php endif; ?>
    </div>
  <?php endif; ?>

  <?php print $links; ?>

</div></div> <!-- /node-inner, /node -->
bastoubach’s picture

Yes, I meant to also move the $submitted below the $content. I will look and compare the differetn versions and try to understand!...
Thanks again!