FrankenDrupal issues

Events happening in the community are now at Drupal community events on www.drupal.org.
museumwebbie's picture

I've got 3 mystery issues I need some help with:

1) I'm getting this (unfortunately familiar) error message on my localhost (WAMP) on every page:

Notice: Use of undefined constant rife - assumed 'rife' in C:\wamp\www\includes\bootstrap.inc on line 998

Bootstrap.inc, Line 998:

if(!function_exists(rife)){
function rife($string){
if(file_exists($string)){
require($string);
}

}}

Commenting out the above statement gets rid of the error but I'm not sure why it was there to begin with & if it's needed for anything. (I'm also not clear on why it's a problem locally but not on the live site since I'm using the same bootstrap.inc file.) Is it safe to ignore or should I be worried?

2) I'm also getting weird layout on IE7 on the local site only-- the main wrapper is left-aligned instead of centered & part of the footer is displaced below where it should be-- copied all css files, .tpl files & blocks from the live site (which looks fine) but it's still doing it. It looks fine on Firefox & Safari. What else could be affecting the layout?

3) Last but not least, we're supposed to be able to put small graphics (touts) in the left sidebar as well as the right, but this has never worked properly and I can't suss out the problem. Here's the relevant portion of the left sidebar code:

$class = "touts";
if($m_data[levels][0]=="visitor-info") $class = "touts_vi";
$section_replace =
array(
"contact-us",
"privacy-policy",
"site-map",
"ncdenr",
"credits",
"search",
"page-not-found"=>"about-us"
);

$touts = get_data("SELECT * FROM touts WHERE position = 'left'");
$touts_data=null;
foreach($touts as $tout){
$tout_alt_text = $tout[alt_text]; if(!$tout_alt_text) $tout_alt_text = $tout[file_name];

if($tout[location] == $m_data[levels][0] or $tout[location] == $section_replace[$m_data[levels][0]])
    $touts_data= 
    '<a href="'.$tout[link].'"><img style="border: none" src="/images/touts/'.$tout[file_name].'" alt="'.$tout_alt_text.'" /></a>';

}

echo '

'.$touts_data; ?>

The touts table looks ok to me, and commenting out the location line puts a tout on every page, but with it in there, none of the left-side touts show up. I've been asked if we can put something in the left sidebar for the Nature Research Center section, so it would be great if somebody could help me figure out how to do that.

Anybody want to take a crack at one or more of these issues?

I'm on IRC for most of the afternoon-- tried to connect to #drupal-nc but looks like nobody's home.

-Nik

Comments

rife needs to be in quotation

afreeman's picture
  1. rife needs to be in quotation marks. See http://php.net/manual/en/function.function-exists.php

  2. No clue, debugging cross-browser CSS issues is not my forte.

  3. Not sure. Check #drupal-nc on freenode, there's a bunch of us hanging out this afternoon.

IE's box calcs are quirky

cgmonroe's picture

I'd guess that your theme is creating columns by floating divs next to each other.

If that is the case, I generally find that if IE is stacking floating items (like columns on top of each other), it's because the CSS has defined the columns too wide for IE. Unfortunately, too wide in IE can be a few pixels less than other browsers, because of some "1 pixel/double margin" bug..err features IE has.

Try setting your column widths a little smaller in CSS or make the width of the containing div a little larger. Also note that sometime margins and padding can cause issues like this (e.g. a containing div has a lot of padding and cuts down the actual width).

Firebug is generally your friend in seeing the margin, padding, and other settings. Oh, it might also be caused by CSS overflow settings or images not having widths set.

Sorry to be so generic... but figuring out floating widths in IE is more of an art than science..

That's what I was thinking,

museumwebbie's picture

That's what I was thinking, but since the live site & local site are both using identical css now & I'm only having trouble with the local site, I'm not sure how it could be the css. Of course I'm not sure what else it could be either. Very strange.

Do you have CSS Optimization turned off?

cgmonroe's picture

Are you optimizing CSS on the production site but not the local site? IE has a nasty bug that limits the number of CSS link statements to 30... anything after that gets ignored.

Downside of this is that optimization makes it harder to do theme development.. FWIW - there is an "unlimited_css" project (for 6) that solves this using @import statements instead of links. But I understand it's better to use optimization on production sites.

Nope, it's not optimized on

museumwebbie's picture

Nope, it's not optimized on either-- won't work on my site.

Hmm...

cgmonroe's picture

Do you have more modules enabled on your local site? E.g. the Devel mods or other development type mods? This might be pushing the local site over the 30 CSS links.

If not, only other thing I can think of is to open the working page in IE, then do a "Save As" / Webpage - Complete. Then do the same for the non-working version. This will almost everything needed to display the page, (e.g. images, css, scripts, and the like) but it may miss any imports or images in CSS. Do the same for the non-working page.

Then use something like WinMerge (www.winmerge.org) to see what the differences are.

Well...

museumwebbie's picture

There's one module enabled on the live site but not the local site; 3 modules installed locally but not enabled, so they shouldn't be contributing to css. I'll try WinMerge-- thanks for the tip!

Found the culprit

museumwebbie's picture

It was really obvious in WinMerge, thanks-- I just don't know what's causing it or how to fix it.

The local (problem) page has 2 doctype declarations, the first of which isn't visible using view source, only when it's saved (?!).

The first doctype declaration is for HTML 4.0 Transitional, the second is the standard XHTML 1.0 Transitional declared in the page template. Changing that first doctype from HTML 4.0 Transitional to HTML 4.01 Transitional fixed the layout issue, I just don't know where it's coming from. Any ideas?

I'm starting to suspect there's a problem with WAMP, which may or may not be related... my system periodically reboots itself, which I've tracked down to a non-specific MySQL error. Maybe I should try it on the Acquia stack.

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: