Announcement

Collapse
No announcement yet.

check Coding Errors generates errors - now what ?

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

    check Coding Errors generates errors - now what ?

    using v8.0.3 I ran the "check coding errors" on the designer menu and it came up with errors (all of them within the "Standard Layout using CSS")

    "variable 'ProductName' is used out of context (2 times)"

    and a few other variables (EncodedProductAnchor, ProductReference, CartError, ProductDescription) with similar problems.

    AFAIK I think that I've moved the "ProductName" out of the < form > </form> area, but kept it in the same layout because I wanted to separate the prompts within the form away from (and in a differerent css style) the actual product names etc.
    I've checked the Variable Reference help file and all it says is area="product | general"

    I've done some experimenting with the variable "CartError" - my ammended layout clearly shows it OUTSIDE the < form> and the Coding Errors generated the message "Variable Cart Error is used out of context"
    When I then move it back WITHIN the < form> the Coding Errors generated the message "Variable Cart Error is used out of context (2 times)"

    Not sure where the "2 times" comes from because its in the SAME layout just three lines higher and within the Form!

    Since moving the CartError variable (part of the experiment), the message for the ProductName shows only ONE error, the "(2 times)" has dissapeared but I have NOT touched the ProductName as part of the experiment.

    I've uploaded the pages it to a trial site and it seems to work !

    so the main question is "just what context should it be used" and as a secondary question, "Can I rely upon the messages generated"

    #2
    Kevin

    When the window comes up showing you the coding errors, click on one of them and it will take you to the problem code. Look in that code for a block of code which contains all of the references with errors. Cut that section into notepad so you can return it if needed and apply the change.

    Almost certainly your problem will be cured instantly.

    Comment


      #3
      I've moved on with this problem.
      been busy playing with the layouts, and decided to REFRESH the website.
      I clicked on the refresh option, then it started checking and came up with 21 errors - I stopped the upload and viewed the errors. (captured the screen - attached as image1.jpg) - they didn't make sense.
      I decided to ignore the errors and hit the refresh again having done NOTHING to anything, I just hit the refresh again - this time, I've ONLY got 14 errors. (captured the screen - attached as image1.jpg)
      so clearly the "check errors" is very buggy.

      I'm accustomed to viewing where the error is by clicking on the problem message, but in my view its too buggy to be reliable, and even if you do view the code, there is nothing there to indicate HOW to correct the error.
      Attached Files

      Comment


        #4
        My policy is to click on the errors and eventually locate the layout actinic is griping about, then revert that layout to factory default.

        I've found the error is often in the search layouts so there is little lost in reverting to factory

        Comment


          #5
          ah but a lot is lost if you've changed the layout.
          I've been playing converting as many tables to css placements, then I get the details in one <div> and the form ( "add to cart" etc ) in another <div>.

          its not the tracking thats the problem its knowing whether to believe it really is an error - hence the 21 errors down to 14 WITHOUT having touched a thing, just running the equivilent of "check for errors" consequitively
          and when I trust the "error", its know how to correct a "context" error without losing my layout.

          Comment

          Working...
          X