Announcement

Collapse
No announcement yet.

cgi-bin link problems

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

    cgi-bin link problems

    Hi all,
    I am developing a site for a client, and have made liberal use of jquery.

    All is well & good, until I test logging in as a customer. Now all the references to js scripts (uploaded using Design->additional files...) are incorrect.

    Even if I use an absolute path in the template ie "/acatalog/product-tabs.js" they still fail to load. Looking in the error console it appears that even some default actinic files give an error...

    "http://retorts.rebelit.dyndns.org/cgi-bin/recentproductssupport.js 404 (Not Found) "

    As well as all the images defined in the product property pages - although despite all the errors they still magically appear on the page.

    What is the best practice for including references to js or css files & having them work in the cgi-pages?

    The development site is here http://retorts.rebelit.dyndns.org/ac...rt-Checks.html (it is still in development so no laughing )

    It is not always online though I'm afraid.

    The client definitely wants customers to be able to login.
    Freelance web design
    www.rebelit.co.uk

    #2
    jQuery works fine with SellerDeck. I use it for many add-ons.

    What you've done is to put some lines that load files from your Site folder into your Overall Layout above the line:

    <actinic:variable name="BaseHref" >

    The above line generates a BASE tag when needed (so files can be correctly referenced on cgi-bin based pages).

    Move all file loading code below this line and you should be OK. Or better move such stuff into the bottom of layout Standard JavaScript Header Functions and it will be correctly located and will survive Theme changes.

    Finally, check CSS files used by your add-ons and make sure that any file-names within URL parameters have quotes around them. SD needs to see them in quotes to automatically upload them.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Ah Thanks for that Norman,

      The referenced files are all found now.

      I am using JQuery UI (1.10.0) for the tabs on the product pages.

      Having moved the scripts under the baseref tags Everything stil works normally when not logged in. But when logged in a very strange error occurs.

      I've narrowed it down to the jquery UI tabs, but haven't got a clue what causes it. :/

      I was referencing the .js & css from the jquery site. So I changed to local versions & added speech marks for all the css url(...) references.

      I briefly see the page which looks like it is duplicating the header within the jquery tabs, and then it redirects to a page with nothing but "no items" and no underlying mark-up.

      Anyway I get the following error in the console..
      Code:
      TypeError: document.getElementById(...) is null
      http://retorts.rebelit.dyndns.org/acatalog/jquery.1.8.2.js
      Line 569
      but I can't see how to debug it since it redirects away.

      test login is as follows.

      username test@test.com
      pwd: password
      Freelance web design
      www.rebelit.co.uk

      Comment


        #4
        jQuery UI Tabs 1.9.2, 1.10.0 and 1.10.1 work fine with my Tabber add-on, both normal HTML pages and cgi-bin based ones.

        You are probably being bitten by http://bugs.jqueryui.com/ticket/8637

        I had to do some tricky stuff to get around this based on comment #4 or 5 in the above thread.

        You can see my Tabber on http://www.drillpine.biz/v12-norlist...g/Cameras.html
        If you use the Search to locate "Digital" and then click the Digital Camera link you'll be on a cgi-bin based page. Note that this is a demo site and has a lot of additional non-standard code running.

        It's got jQuery UI based: DatePicker, Tabs and Menu. Also Nivo Slider and a custom Icon Tooltip Images and a Quick Order Form.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Originally posted by NormanRouxel View Post
          ....
          You are probably being bitten by http://bugs.jqueryui.com/ticket/8637
          ....
          Hi Norman,
          yes that was the bug. thanks a lot.


          I had been using nivo-slider on this site, but when placing the slider on a jquery tab I was having resizing issues when switching between the tabs.

          I have replaced that with the bxslider which is working very nicely & allows for any html under each slide.


          All the products use code in !!< >!! tags for layout etc... several of them, like the retort checks http://retorts.rebelit.dyndns.org/ac...rt-Checks.html

          include links to some pdf's relating to product specs & selection charts etc... Now these are all uploaded via "additional files..." and the links are unqualified eg
          HTML Code:
          <a href="some_pdf_file.pdf">file</a>
          These are now broken. I assume this is due to them occurring with a fragment rather than within the loop of a given product. So the cgi-script gets no product id through the url? <sigh>

          I'm calling it a day for today... thanks for your help guys.
          Freelance web design
          www.rebelit.co.uk

          Comment


            #6
            SellerDeck automatically parses links like <img src="mycustomimage.jpg" /> so that the link would work on Brochure Home Page, and elsewhere throughout the site. It's probably not auto-detecting your PDF files so you may need to use:
            Code:
            <a href="<actinic:variable name="CatalogURL" />some_pdf_file.pdf">file</a>
            And you could put a BlockIf around the <actinic:variable name="CatalogURL" /> so it's only included IfNotPreviewMode.

            If the above is in embedded HTML then:
            Code:
            !!<<a href="[CatalogURL]some_pdf_file.pdf">file</a>>!!
            Will work.

            P.S. You may want to add target="_blank" to these links to prevent the customer leaving your product page.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X