0

I have got a problem. I have been upgrading my site from Drupal 6 to 7 and I've reached about 75% of the way. I have updated all my 3rd party modules and custom modules and while I was configuring some setting for my 3rd party modules, like Taxonomy Image, I noticed that in my front page the teasers where displaying a view that I wanted to embed only in the full node view.

I looked at my node.tpl.php, which is where I was adding the view and the if/else for the view looks good, but for some reason, when I debugged it, the if ($teaser) is not the one that it is going to when I load the front page, it is actually going to the else.

This is the code in my node.tpl:

  <div class="clearfix">
    <?php if (!empty($content['links'])): ?>
      <div class="links"><?php print render($content['links']); ?></div>
    <?php endif; ?>
        <?php if($teaser): ?> 
            <?php print render($content['comments']); ?>
        <?php else: ?>
        <!--    //Add the comments and related_by_term block to the footer_wrapper div -->
            <div id="footer_wrapper">
                <?php print render($content['comments']); ?>
                <?php $related_by_term_block = block_load('views', 'related_by_term-block_1');
                    $block_content = _block_render_blocks(array($related_by_term_block));
                    $build = _block_get_renderable_array($block_content);
                ?>
                    <div id="blackborder_related_by_term_block">
                <?php 
                    print render($build); 
                ?>
                    </div>
            </div>
        <?php endif; ?>
    </div>

I have no idea if any of the 3rd party modules I have are getting in the way. This is the list of my 3rd party modules:

  1. FLAG
  2. DATE
  3. CAPTCHA
  4. MOLLOM
  5. ADVANCED HELP
  6. BETTER FORMATS
  7. FLAT COMMENTS
  8. FORWARD
  9. SEARCH CONFIGURATION
  10. SHARED EMAIL
  11. VOTING API
  12. WYSIWIG
  13. AUTHOR PANE
  14. PUBLISH CONTENT
  15. WORKFLOW
  16. THEMEKEY
  17. CHAOS TOOL SUITE (CTOOLS)
  18. VIEWS
  19. ENTITY API
  20. VIEWS BULK OPERATIONS (VBO)
  21. VIEWS ATTACH (EVA)
  22. SIMILAR BY TERMS
  23. ADVANCED FORUM
  24. RULES
  25. LIBRARIES API
  26. GRAMMAR PARSER
  27. GRAMMAR PARSER LIBRARY
  28. HTML PURIFIER
  29. TOKEN
  30. INVITE
  31. FIVESTAR

Any input would be greatly appreciated. Thanks.

8
  • Debug $view_mode, what do you get?
    – Alex Gill
    Commented May 8, 2013 at 7:58
  • $teaser is an 'undefined' which is what's really odd. $view_mode say's 'full'.
    – SN_26
    Commented May 8, 2013 at 7:58
  • Go to your content type (in the CMS) and see if it has a 'teaser' view mode.
    – Alex Gill
    Commented May 8, 2013 at 8:03
  • Its under 'Manage display'.
    – Alex Gill
    Commented May 8, 2013 at 8:11
  • Yeah, it is does have a teaser view mode. I just checked the article node type.
    – SN_26
    Commented May 8, 2013 at 8:11

1 Answer 1

0

It is the Advanced Forum module that is causing the problem. Once I disabled it, it displayed as a teaser. Now, I need to figure out just why. Thanks for your help, Alex, really appreciate it.

1
  • Well done, no worries! ;-)
    – Alex Gill
    Commented May 8, 2013 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.