Specific pages of drupal are not working as they should. here is an example. I'm coming to wits end on this one. It also happens on node/add, build/blocks....etc.

here is my page.tpl.php (validates), there are a few errors with the css. That is because of my ie comment hacks.

<?php
// $Id: page.tpl.php,v 1.18 2008/01/24 09:42:53 goba Exp $
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
  <head>
    <title><?php print $head_title ?></title>
    <?php print $head ?>
    <?php print $styles ?>
    <?php print $scripts ?>
    <!--[if lt IE 7]>
      <?php print phptemplate_get_ie_styles(); ?>
    <![endif]-->
  </head>
  <!--<body<?php print phptemplate_body_class($left, $right); ?>>-->
  <body>

<!-- Layout -->

    <div id="wrapper">
      <div id="header">
        <div id="logo-floater">
        <?php
          // Prepare header
          $site_fields = array();
          if ($site_name) {
            $site_fields[] = check_plain($site_name);
          }
          if ($site_slogan) {
            $site_fields[] = check_plain($site_slogan);
          }
          $site_title = implode(' ', $site_fields);
          if ($site_fields) {
            $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
          }
          $site_html = implode(' ', $site_fields);

          if ($logo || $site_title) {
            print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">';
            if ($logo) {
              print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
			  print '<img id="logo-two" src="' . 
			  drupal_get_path('theme', 'fbcamc') . '/images/logo2.jpg" alt="@ mill creek" />';
            }
            print $site_html .'</a></h1>';
          }
        ?>
        </div>

        <?php if (isset($primary_links)) : ?>
<div id="nav-bg">

			<?php print '<img id="left-corner" src="' . 
			drupal_get_path('theme', 'fbcamc') . '/images/nav-corner-left.jpg" alt="nav left"/>'; ?>
          <?php print theme('links', $primary_links, array('id' => 'nav')) ?>
		
			<?php print '<img id="right-corner" src="' . 
				drupal_get_path('theme', 'fbcamc') . '/images/nav-corner-right.jpg" alt="nav corner right"/>'; ?>
		</div>
        <?php endif; ?>
      </div> <!-- /header -->

         
		  <div id="page-main">
 <?php print $breadcrumb; ?>
		  <div id="page-left">

        <?php if (isset($secondary_links)) : ?>
          <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>
        <?php endif; ?>
      <?php if ($left): ?>
          <?php if ($search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
          <?php print $left ?>
      <?php endif; ?>
<!--
	        <?php if ($right): ?>
        <div id="sidebar-right" class="sidebar">
          <?php if (!$left && $search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
          <?php print $right ?>
        </div>
      <?php endif; ?>
-->
	  </div>
      <div id="page-right">
        <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
          <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
          <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
          <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
          <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
          <?php if ($show_messages && $messages): print $messages; endif; ?>
          <?php print $help; ?>

            <?php print $content ?>

          <?php print $feed_icons ?>
</div>
      </div>
    </div>
<!-- /layout -->

<div id="footer">
<div id="footer-wrapper">
<div id="footer-list">
<ul>
<?php print '<li>+' . l(t('Home'), '') . '</li>';
print '<li>+' . l(t('Contact'), 'contact-us') . '</li>';
print '<li>+' . l(t('Site Map'), 'site-map') . '</li>';
print '<li>+' . l(t('Search'), 'search') . '</li>';
?>
</ul>
</div>
<?php print '<img id="footer-img" src="'.drupal_get_path('theme', 'fbcamc') . '/images/footer-logo.jpg" alt="footer"/>';?>
<div id="footer-addy">
Faith Baptist Church @ Mill Creek<br />
1S455 S. Mill Creek Drive<br />
Geneva, Il 60134<br />
<br />
ph: 630.845.2532<br />
</div>
</div>	  
		  <?php print $footer_message . $footer ?>


  <?php //print $closure ?>
  </body>
</html>

I'm going insane :( Thanks ahead of time

Comments

lilott8’s picture

The above code has two validation errors, forgot to recopy the validated code.

Jeff Burnz’s picture

Except that you don't actually say what the problems are? We can see the site is broken, but can only assume (at the point in time that we visit) what the actual problem is that you need help with.

lilott8’s picture

batting .1000 for me...or not at all.
Any image that is drawn through the page.tpl.php on particular pages (any sub page of the /ministries view) do not draw. I honestly can't pinpoint the issue. I've tried the devel theme module, to see, firebug, nothing. I've even created a page-ministries.tpl.php. All to no avail. It makes no sense to me. I am confounded by this odd anomaly.

dman’s picture

You REALLY should have said what the problem was ;-)

OK. Step 1. Go check your 404s. Does that give you a clue? ?

OK, now try:

 print '<img id="logo-two" src="' . url(drupal_get_path('theme', 'fbcamc') . '/images/logo2.jpg' ) .'" alt="@ mill creek" />';

I think things would have seemed to work on short URLs ... but not longer aliases with subdirectories :-)

It's normal HTML and relative URL resolution, not even Drupal.

There are also better tricks - like using the $directory variable instead of drupal_get_path ... but this example is not very close to best-practices for theme building, (but it works) so I'll leave that alone.

... except to say that if you'd used css in the first place you wouldn't have had this problem ;-)

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

lilott8’s picture

This drupal theming is going to be the death of me. Thank you so much! I didn't know that drupal logged 404's of images not found. That actually is very insightful. Thanks.

nevets’s picture

I use firebug (a Firefox extension) and the net tab. It will show you all the parts it downloaded or tried to. For the images that fail mousing over the file name will show the full path which usually provides the clue. Without a url I am guessing your have image with relative paths so they resolve differently depending on the url.

lilott8’s picture

You were exactly correct. Thanks!