I have a strange problem with IE 7 (possibly 6 as well, not tested yet), in that it does not output any node data in my view.

Here's the situation. i have a content type with 7 fields (days of week), I've put them in a block using views. I then added a Javascript slider, via the node template, so the view only showed one day and you could click through the others.

This displays and runs fine in Firefox, but in IE it displays the slider and buttons but no node content, other than the title. From what I can tell, IE seems to not have access to the php variables that grab node data when this Javascript is enabled.

You can see the page here just ignore the fact the buttons are not in the right place, I haven't styled it all yet.

Any ideas, or perhaps a better way to do this!?

(note: I did have each day as a separate node but this takes ages to update and add to, and each week has the same image and title. So creating a node of weeks makes more sense.)

Comments

coreyp_1’s picture

The paging function works correctly in IE7 for me, although the positioning is wrong.

The problem has nothing to do with PHP, because PHP is processed on your server, and then it is sent to the browser. It may be a Javascript, CSS or HTML issue, though. Since I'm not seeing any Javascript errors, and the paging function is working correctly for me, I would begin by validating my html and css. The CSS and IE's poor implementation of the box model is probably the source of the positioning problem.

Make sure that IE is displaying the latest version of the CSS and Javascript files from your server, and not from your local cache. IE is notorious for this. Just press F5 (or Ctrl+F5, I can't remember which), to force a reload from the server. It's kind of like the Ctrl+Alt+Del for web browsers.

- Corey

sampeckham’s picture

Thanks for taking a look. I was actually playing around with it around the time you must have been looking.

The problem wasn't actually any of these things, and was something that caught me out once before. I was using $node->field_sunday[0]['view'] to show the content for each day, but IE doesn't process that version, and you have to use ['safe'] at the end. Really frustrating!

Since the PHP is done server side is there a reason why you get this variation between browsers?

The layout was all wrong because I hadn't made any CSS changes from the stylesheet that came with the script.

coreyp_1’s picture

The browser never sees a bit of PHP, and the server will send the same output regardless of which browser you are using.

Now, if you were logged in on one browser, and not on the other, then that could cause a discrepancy, if anonymous users are not granted permission to view the variable you were accessing.

- Corey

sampeckham’s picture

Ok that makes sense.

But does that mean the permissions for nodes and fields, only affect the ['value'] and ['view'] items of the array, and that permissions don't apply to the ['safe'] item?