homepage Welcome to WebmasterWorld Guest from 54.166.66.204
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Error at bottom of browser page
[an error occurred while processing this directive]
SRegal




msg:4621854
 4:03 pm on Nov 7, 2013 (gmt 0)

I'm having a difficult time figuring out why I'm getting the following error message at the bottom of my browser window(all browsers):

[an error occurred while processing this directive]

I'm guessing that it's being caused by a javascript error.
The page seems to be working just fine, other than receiving the error message at the bottom.

What do guys suggest?

 

robzilla




msg:4621862
 4:34 pm on Nov 7, 2013 (gmt 0)

Are you using Server Side Includes (SSI)?

e.g.
<!--#include file="include.html" -->

SRegal




msg:4621863
 4:39 pm on Nov 7, 2013 (gmt 0)

I am not using SSI

Fotiman




msg:4621867
 5:04 pm on Nov 7, 2013 (gmt 0)

Which browser are you using? You can try using your browsers developer tools to see if there's an error and on what line. In Chrome, for example, press F12 to open the developer tools, then find the icon near the bottom left that says Show Console and click it. Then refresh the page.

SRegal




msg:4621874
 5:18 pm on Nov 7, 2013 (gmt 0)

Ok, so I'm getting this error when using developer tools:
Uncaught TypeError: Cannot read property 'msie' of undefined
script.js:70
storeVisit script.js:70
init script.js:548

This js file is hosted elsewhere and is part of an email form submit. I've tried removing it completely and still get the same error... so it has to be something else.

lucy24




msg:4621933
 9:18 pm on Nov 7, 2013 (gmt 0)

Are you using Server Side Includes (SSI)?

That would never show up as a browser error message anyway. The browser only knows that it made a request which wasn't fulfilled, or attempted an action that it didn't complete. An SSI by definition happens without the browser's knowledge; any error message will be embedded in the page's html. Similarly you will never see a blank .php page with a browser message "Somebody screwed up" ;)

I've tried removing it completely and still get the same error...

Have you tried downloading as js files and looking at them directly? Also verify that each <script> envelope corresponds to some file and/or function that you've got in front of you.

robzilla




msg:4621958
 11:34 pm on Nov 7, 2013 (gmt 0)

That would never show up as a browser error message anyway. The browser only knows that it made a request which wasn't fulfilled, or attempted an action that it didn't complete. An SSI by definition happens without the browser's knowledge; any error message will be embedded in the page's html.

It would, actually, and I think SRegal wasn't referring to a browser warning (correct me if I'm wrong) but rather to an error notice that appears at the bottom of the page (hence all browsers showing the same error). Furthermore, this is a common error message for Server Side Include issues. See Apache.org on SSI [httpd.apache.org]:

Usually, when something goes wrong with your SSI directive, you get the message

[an error occurred while processing this directive]

In fact, I can't find any proof that this could be related to anything other than SSI. Certainly not Javascript.

SRegal, what's actually happening, or supposed to happen, at the bottom of the page where the error appears? Anything in your source code at that location?

If you're not using SSI, then perhaps you're embedding something that is?

lucy24




msg:4621964
 11:56 pm on Nov 7, 2013 (gmt 0)

Memo to self: READ question before answering it.

If it's an SSI error, there should also be something in the html. By default it's a visible-to-the-naked eye text that says something like "SSI error" at the point where the include was supposed to happen. (If you don't knowingly use SSIs, you probably have the default error message.) A custom error message will probably be inside <!-- comment --> tags so you'll only see it in the page source, not in the visible page.

Worst-case scenario is if the server didn't even try to include the file; then the html will say the same thing the physical file says, beginning in <!-- #include. But in this last case, I don't think the server would even report an error, because it doesn't know that there was one.

SRegal




msg:4622032
 2:14 pm on Nov 8, 2013 (gmt 0)

I have my javascript at the bottom of the page. The error message is showing up between two of the scripts in the html:

<script>
$(document).ready(function() {
$('.fancybox').fancybox();
});
</script>

[an error occurred while processing this directive]

<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.tp-banner').revolution(
{
delay:9000,
startwidth:960,
startheight:460,
hideThumbs:10
});
});
</script>

SRegal




msg:4622041
 3:17 pm on Nov 8, 2013 (gmt 0)

I figured it out.... I had a comment in the code exactly where the error message was showing up. Once I removed the comment the error went away.
Thanks everyone for the suggestions. I'll have to be more careful with the comments in my code.

lucy24




msg:4622147
 9:47 pm on Nov 8, 2013 (gmt 0)

Yikes! For everyone else's benefit: what, exactly, did the comment say? Did it f'rinstance begin with a # character? Say you leave a note to yourself

<!--#foobar anchor to call this script -->

and then mod_include thinks "foobar" is the name of a directive that it doesn't understand.

I detoured to my test site, pasted in the above literal text on a random page, disabled my custom SSI error message-- comment, not visible text-- and indeed I got
[an error occurred et cetera
at point of insertion. Further experimentation shows that it's fine to begin a comment in # so long as you include a leading space.

:: rewind ::

exactly where the error message was showing up

In the body of the html? That's what I would have expected in the circumstances, but I thought the point was that the error message displayed somewhere else, like in the message area at the bottom of the browser window.

SRegal




msg:4625414
 4:18 pm on Nov 22, 2013 (gmt 0)

The comment was at the bottom of my page between some of the scripts
<!-- ##############################
- ACTIVATE THE BANNER HERE -
##############################
-->

So the error showed up at the very bottom of the page. When inspecting the html the error showed up exactly where the comment was between the scripts.

robzilla




msg:4625500
 12:36 am on Nov 23, 2013 (gmt 0)

Well, there you go. That'll be interpreted as an SSI call. I'm guessing you copy pasted that, and whoever wrote it probably didn't think about SSI either. It's likely to be meant as an instruction to you, the user of the code snippet: "activate the banner here". So you can remove that comment and, err, activate the banner, I guess.

I do hope you have it working by now :-)

lucy24




msg:4625503
 1:40 am on Nov 23, 2013 (gmt 0)

So you can remove that comment and, err, activate the banner, I guess.

Or keep the comment but get rid of the row of #. In my experiments it worked as intended so long as you have a space before the first # but apparently this isn't always the case.

SRegal




msg:4625803
 2:07 pm on Nov 25, 2013 (gmt 0)

Yeah, I copied and pasted the js for a slider I purchased. After removing the comment the SSI error was no longer an issue. Thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved