Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Safari 3 Bug... Any Ideas?

Go to End

8 Posts   3944 Views


4 Posts

7 July 2007 at 6:59am

Hey folks,

As you know I've been working on getting Silverstripe compatible with Safari 3, however there's one bug that I can't seem to resolve. Under asset management in the CMS, when one selects a folder name in the left pane, Safari will throw up an error message: Undefined value. (This is Safari 3.0.2 beta on OS 10.4.10)

What's weird about this one is that except for the pop up, it's like no bug ever occurred. No javascript error is logged to the Safari debugging console, and there's no error at all when it's run through WebKit. Weird, right? On the other hand, when it's run through Safari using Drosera the application will crash at that point every time.

Any brave souls willing to try it out and let me know what they think?


Google Summer of Code Hacker, 222 Posts

7 July 2007 at 7:35am

Not that these help, but here are 3 places I found that seem to refer to this type of error:

1. "to my cart, but a JS error prevented it from working. TypeError: Undefined
2. "Safari displays an "Undefined Value" for every DWR call. "
3. "I get a dialog saying it could not do it, "TypeError: Undefined value" whatever that means."

I'm going to look at what happens when a folder is clicked and see if I can find any clues to what is triggering this error.


Google Summer of Code Hacker, 222 Posts

7 July 2007 at 8:41am

Edited: 07/07/2007 8:46am

Hi Meg,

I found the problem! :)

By putting a bunch of calls like:

alert('debug 1');
// some code here
alert('debug 2');

I was able to trace the source of this error to this line in cms/javascript/LeftAndMain_right.js:
} catch(er) {alert(er.message);}

I basically just kept putting in stuff like alert('debug #'); until I got alerts that came before and after the "Undefined variable" alert and eventually I found that line. It sure was not easy to find though. I thought it was something Safari was throwing up, not a call to alert().

If I ever put in a debug message using alert() I think I'll always try to put in location info so that the source of the error won't be so hard to find (like this one was!).

I made added the location to the error message:
and committed it to the cms gsoc svn:
r38062 | elofgren | 2007-07-06 15:34:13 -0500 (Fri, 06 Jul 2007) | 1 line

Give location of error in the alert() that is inside a catch block in LeftAndMain_right.js CMSForm.loadNewPage() to make debugging Safari 3 problem easier. See:

So basically something in these lines in cms/javascript/LeftAndMain_right.js is triggering an error:

allIframes = this.getElementsByTagName('iframe');
if(allIframes) for(i=0;i<allIframes.length;i++) {
try {
allIframes.contentWindow.location.href = allIframes.src;
} catch(er) {alert('Error in LeftAndMain_right.js CMSForm.loadNewPage(): ' + er.message);}

Maybe it's because there are no iframes on the page?

Hope this helps,



4 Posts

7 July 2007 at 9:17am

Awesome dude - that's a big help. Thanks!


Forum Moderator, 628 Posts

7 July 2007 at 1:10pm

Cheers Elijah for helping out! :)

The Frenchy

Core Development Team, 40 Posts

8 November 2007 at 2:17pm

I have found where the problem comes from (thanks to the alert window content changes).

Actually, it's everytime you add an ImageField or FileIFrameField in a page and I don't know why it happens only on Safari 3.

I am working on this problem but unfortunately, I can't manage to add the debug mode and the console on my Safari 3 beta for windows.

If u have any ideas about that, it will help me.


Community Member, 5 Posts

18 March 2008 at 2:11pm

Just wondering if anyone has picked this up since Nov 07?

Not sure if it will help anyone but I've attached a screenshot of an error I get in Opera 9.25 when clicking on the site content tree in the admin.

Is this javascript error related to the Safari 3 gallery compatibility error?

I'd really like to be able to see lightwindow working in Safari 3 as it should.


Forum Moderator, 628 Posts

25 March 2008 at 9:29pm

tin_soldier, no screenshot attached.

if you have a reliably-produceable bug please submit it at, after checking its not a duplicate :)