Announcement

Collapse
No announcement yet.

Preview Pane Script Error Pop-ups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Preview Pane Script Error Pop-ups

    We have a site with which we cannot use the Preview Pane in Actinic.

    The termplates are heavily customised and include Java scripts that only work when uploaded to the website. Previewing in browser works fine and just as with v6, it reports an Error on Page in the Status bar.

    However, in the preview pane we get multiple pop-up error messages whenever selecting a new section or product:

    Internet Explorer Script Error - an error has ocurred in the script on this page, etc, etc. Do you want to continue running scripts on this page Yes/No?

    The options in Internet Explorer are set to Disable script debugging with Display a notification about every script error switched off. So we do not get the pop-up error notification when previewing in browser - just in the preview pane.

    This implies that Actinic is using IE with different options from those we have set - can you explain how we can change this to not get the pop-ups please?


    Tim Weaver
    WISE.CO.UK
    Consultancy, Innovation & Solutions

    tim.weaver@wise.co.uk
    http://www.wise.co.uk

    #2
    Hi there,

    >This implies that Actinic is using IE with different options from those we have set - can you explain how we can change this to not get the pop-ups please?

    IE works based on the user settings . If you disabled javascript debugger, then you will not get the error messages popup.

    Cheers,

    Bruce
    Bruce King
    SellerDeck

    Comment


      #3
      I get the same kind of thing when I do a preview in my HTML editor.

      The best thing to do is fix the script. The cart sumamry is a common source of this eroor. Just change the script type from 'javascript' to 'text/javascript'.

      Mike
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #4
        Sorry to disagree, but to elaborate on what I descibed in my original post:

        in IE6, Tools, Internet Options, Advanced tab the option Disable script debugging is checked.

        and as I described the pop-up error occurs in the Actinic Preview Pane, but does NOT happen when I do an Offline Preview or Offline Page Preview.


        Tim Weaver
        WISE.CO.UK
        Consultancy, Innovation & Solutions

        tim.weaver@wise.co.uk
        http://www.wise.co.uk

        Comment


          #5
          Olderscot,

          I've checked and edited all of the script types in the templates to include type= 'text/javascript', but it makes no difference, (most of the templates already used the script tag correctly defined anyway).

          Further investigation shows that the lines reported in error are all those where a function is called that is located in an external script library.

          But the issue still remains of why it is only in Actinic Preview that the errors pop-up.


          Tim Weaver
          WISE.CO.UK
          Consultancy, Innovation & Solutions

          tim.weaver@wise.co.uk
          http://www.wise.co.uk

          Comment


            #6
            Further investigation shows that the lines reported in error are all those where a function is called that is located in an external script library.
            Are you referring to the...

            <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
            <SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>

            ... lines or are you referring to your own custom external JavaScript file?

            Or are you referring to a line similar to...

            <SCRIPT LANGUAGE="JavaScript" SRC="Act_sections.js" TYPE="text/javascript"></SCRIPT>

            ... the format for which comes from 'Design | Text' - go to Phase -1: ID: 2038 (but that isn't normally a problem).

            To be perfectly honest - you're the only person who has ever reported an issue with this so I'm guessing it is something to do with your settings.

            I'm happy for you to send me a snapshot to communityadmin[@]actinic.co.uk if you want me to see if I get the error as well.

            Comment


              #7
              Chris

              It seems to only occur with references to routines defined in third party script libraries. However, these libraries are declared using pseudo-relative URLs, (to avoid DNS lookups each time while maintaining correct addressing independant of directory levels), see below for examples.

              So I would normally expect script errors when previewing which is why I have the options to display the errors switched off in IE6. It's just that Actinic doesn't seem to be using these IE options, but using the default options instead, (I believe that when installed the browser option default is to display a notification about every script error, and for script debugging to be enabled).

              I've looked through the Registry, but not seen any obvious settings that I could change, so it might be worth asking your developers whether this behaviour is a consequence of the API call to IE and whether it can be changed at all.


              Example of code:

              <HEAD>
              ..........
              <script language="JavaScript1.2" src="/assets/menus/ajlib.js" type="text/javascript"></script><script language="JavaScript1.2" src="/assets/menus/ajmenu.js" type="text/javascript"></script>
              .....
              </HEAD>

              <BODY OnLoad="loadMenu();" onresize="loadMenu()" BGCOLOR="#edebc9" TEXT="#000000" LINK="#000000" VLINK="#808080" ALINK="#ff0000">
              .....
              <script language="JavaScript1.2" src="/assets/menus/banmenu.js" type="text/javascript"></script><script language="JavaScript1.2" type="text/JavaScript">
              displayMenu();
              </script>
              .....
              <script language="JavaScript1.2" type="text/JavaScript">createMenu();</script>
              </BODY>


              Tim Weaver
              WISE.CO.UK
              Consultancy, Innovation & Solutions

              tim.weaver@wise.co.uk
              http://www.wise.co.uk

              Comment


                #8
                /assets/menus/ajlib.js
                If you actually create this folder structure (with the file) within the 'Site1' folder, and within the 'PreviewHTML' folder, then you will lose the errors in Preview. The problem is that Actinic is looking for these files within the 'PreviewHTML' folder and not finding them.

                The other option is to use a fully-qualified http:// url to point to the JavaScript files.

                Comment


                  #9
                  Chris

                  I've copied the directory and file structure in as suggested, but I still get the errors!

                  Looking into it a bit closer I note that if I click on any section or product in the catalog the errors alway seem to be the same:

                  An error has occurred in the script on this page
                  Line: <line no.>
                  Char: 1
                  Error: Object Expected
                  Code: 0
                  URL: file://C:\Program Files\Actinic v7\Sites\WISE\PreviewHTML\P_index.html


                  There are always four error pop-ups per page reporting four line nos. and it is always the same URL.

                  If I select the Brochure then the URL changes to P_Brochure.html or to the relevant brochure page name.

                  Maybe Actinic doesn't like the reference starting with "/"?


                  Tim Weaver
                  WISE.CO.UK
                  Consultancy, Innovation & Solutions

                  tim.weaver@wise.co.uk
                  http://www.wise.co.uk

                  Comment


                    #10
                    Maybe Actinic doesn't like the reference starting with "/"?
                    Could be - that may make Actinic think that the paths are relative to the 'Actinic v7' folder rather than the 'PreviewHTML' folder.

                    Comment


                      #11
                      References that start with '/' indicate to the brower to 'start navigating from the root of the site' - this works online as there is a defined site root - your domain - when using this locally on a windows machine, browesers transform this to file:///X:/path/to/the/file i.e. it goes to the root of the current drive.

                      You need to change the references to the scripts to make them relative to the current document, not the site root in order to make the preview work.
                      Matt
                      Actinic User since v.3

                      Custom Actinic Site Specialist:
                      <a href="http://www.glowsticksdirect.co.uk/">GlowSticksDirect.co.uk</a>
                      <a href="http://www.digishopdirect.co.uk/">DigiShopDirect.co.uk</a>
                      <a href="http://www.calibreshopping.co.uk/">CalibreShopping.co.uk</a>

                      Comment


                        #12
                        Thanks, spot on!

                        The /assets folder needed to be put at the route of the drive and then preview works error free!

                        Al your help and advice is much appreciated.


                        Tim Weaver
                        WISE.CO.UK
                        Consultancy, Innovation & Solutions

                        tim.weaver@wise.co.uk
                        http://www.wise.co.uk

                        Comment


                          #13
                          Preview errors / ACTSECTIONTREE_NAMES

                          Originally posted by Tim Weaver
                          Chris

                          An error has occurred in the script on this page
                          Line: <line no.>
                          Char: 1
                          Error: Object Expected
                          Code: 0
                          URL: file://C:\Program Files\Actinic v7\Sites\WISE\PreviewHTML\P_index.html


                          There are always four error pop-ups per page reporting four line nos. and it is always the same URL.
                          I am having a similar problem. On my system it seems to have a problem with NETQUOTEVAR:SECTIONTREE_NAMES and NETQUOTEVAR:SECTIONTREE_URLS. In the preview file P_shop.html, these NETQUOTEVARS are converted into :

                          <SCRIPT LANGUAGE="JavaScript" SRC="../Act_section_tree_names.js" TYPE="text/javascript"><!--
                          // -->
                          </SCRIPT>

                          <SCRIPT LANGUAGE="JavaScript" SRC="../Act_section_tree_URLs.js" TYPE="text/javascript"><!--
                          // -->
                          </SCRIPT>

                          And then the errors appear. I suppose it doesn't like the SRC="../" bit - but what can I do about it?

                          Liam

                          Comment


                            #14
                            Liam

                            That SRC="../Act_section_tree_names.js" when previewing is correct. In this case you're looking at a file in PreviewHTML and the .. tells the browser to look in the parent (Site1) which is where these files are usually located - but check if they are in fact there.

                            When you upload the live site Actinic removes the "../" portion - it's only there when previewing.

                            The errors are probably coming from somewhere else. Possibly you have some wierd characters in a sections page name or description.

                            Also paste the preview URL into Firefox and use it's Tools / JavaScript Console to get decent error messages instead of IE's useless ones.

                            A good way
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #15
                              Thanks Norman. I suppose firefox was more helpful... except I haven't a clue what this error message means!

                              Error: [Exception... "'Permission denied to get property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///i:/Program%20Files/Actinic%20v7/Sites/Site1/PreviewHTML/P_shop.html :: <TOP_LEVEL> :: line 1787" data: no]

                              Liam

                              Comment

                              Working...
                              X