8 Replies Latest reply on Jul 9, 2013 11:07 AM by contactsampeternow

    CQ_Analytics is not defined on dispatcher

    contactsampeternow

      Hello,

      We have a blog site that that uses some personalization feature on the site. It allows the user to post comments. The username extracted from the cookie is displayed next to the comments posted by the user on the publish servers (we have two publish servers). However the same functionality is not working on the dispatcher web server. (Apache)

      We noticed that on dispatcher, when the page loads it gives errors in firebug console for CQ_Analytics

       

      SyntaxError: syntax error

      http://myserver/etc/segmentation.segment.js

      Line 1

       

      ReferenceError: CQ_Analytics is not defined

      http://myserver/etc/segmentation.segment.js

      Line 1

       

      ReferenceError: CQ_Analytics is not defined

      http://myserver/2013/may/commenting.html?cq_ck=1372431229981

      Line 566...

      and so on...

       

      Due to the above error the username is not posted properly when a comment is posted by the user to the server and hence it is reported as "Anonymus". Although the view source of the page shows that user id is availble on the dispatcher.

       

      Can someone help me to resolve this issue- Why this is working fine on publish instance, but not on dispatcher ?

        • 1. Re: CQ_Analytics is not defined on dispatcher
          Yogesh Upadhyay Level 4

          Can you make sure that there is no filter setting on dispatcher blocking personalization request ? To test enable everything and check.

           

          Yogesh

          • 2. Re: CQ_Analytics is not defined on dispatcher
            contactsampeternow Level 1

            Here is the core dispatcher.conf file.

            /farms

              {

              /website

                {

                /clientheaders

                  {

                  "*"

                  }

             

                /virtualhosts

                  {

                  "*"

                  }

             

                /renders

                  {

                  /rend01

                    {

                    /hostname "internalqaserver1"

                    # Port of the render

                    /port "80"

                    # Connect timeout in milliseconds, 0 to wait indefinitely

                    /timeout "500"

                /receiveTimeout "60000"

                    }

                  /rend02

                    {

                    # IP of the render

                    /hostname "internalqaserver2"

                    # Port of the render

                    /port "80"

                    # Connect timeout in milliseconds, 0 to wait indefinitely

                    /timeout "500"

                /receiveTimeout "60000"

                    }

                  }

             

               /filter

                  {

                  /0001 { /type "allow"  /glob "*" }

                  /0002    { /type "deny"  /glob "* *.index.html*" }  # To deny caching the index page

             

             

                  /0023 { /type "allow" /glob "* /content*" }  # disable this rule to allow mapped content only

             

             

                  /0041 { /type "allow" /glob "* *.css *"   }  # enable css

                  /0042 { /type "allow" /glob "* *.gif *"   }  # enable gifs

                  /0043 { /type "allow" /glob "* *.ico *"   }  # enable icos

                  /0044 { /type "allow" /glob "* *.js *"    }  # enable javascript

                  /0045 { /type "allow" /glob "* *.png *"   }  # enable png

                  /0046 { /type "allow" /glob "* *.swf *"   }  # enable flash

             

                  /0061 { /type "allow" /glob "POST /content/[.]*.form.html" }  # allow POSTs to form selectors under content

                  /0062 { /type "allow" /glob "* /libs/cq/personalization/*"  }  # enable personalization

             

                  # Deny content grabbing

                  /0081 { /type "deny"  /glob "GET *.infinity.json*" }

                  /0082 { /type "deny"  /glob "GET *.tidy.json*"     }

                  /0083 { /type "deny"  /glob "GET *.sysview.xml*"   }

                  /0084 { /type "deny"  /glob "GET *.docview.json*"  }

                  /0085 { /type "deny"  /glob "GET *.docview.xml*"  }

             

                  /0086 { /type "deny"  /glob "GET *.*[0-9].json*" }

             

                  # Deny query

                  /0090 { /type "deny"  /glob "* *.query.json*" }

                  }

             

                # The cache section regulates what responses will be cached and where.

                /cache

                  {

                  /docroot "/home/crx/"

             

                  /rules

                    {

                    /0000

                      {

                      /glob "*"

                      /type "allow"

                      }

                    }

             

                  /invalidate

                    {

                    /0000

                      {

                      /glob "*"

                      /type "deny"

                      }

                    /0001

                      {

                      # Consider all HTML files stale after an activation.

                      /glob "*.html"

                      /type "allow"

                      }

                    }

                  /allowedClients

                    {

                    }

             

                  }

             

                /statistics

                  {

                  /categories

                    {

                    /html

                      {

                      /glob "*.html"

                      }

                    /others

                      {

                      /glob "*"

                      }

                    }

                  }

                }

              }

            • 3. Re: CQ_Analytics is not defined on dispatcher
              Yogesh Upadhyay Level 4

              Just to test can you replace

               

              /filter

                    {

                    /0001 { /type "allow"  /glob "*" }

                    /0002    { /type "deny"  /glob "* *.index.html*" }  # To deny caching the index page

               

               

                    /0023 { /type "allow" /glob "* /content*" }  # disable this rule to allow mapped content only

               

               

                    /0041 { /type "allow" /glob "* *.css *"   }  # enable css

                    /0042 { /type "allow" /glob "* *.gif *"   }  # enable gifs

                    /0043 { /type "allow" /glob "* *.ico *"   }  # enable icos

                    /0044 { /type "allow" /glob "* *.js *"    }  # enable javascript

                    /0045 { /type "allow" /glob "* *.png *"   }  # enable png

                    /0046 { /type "allow" /glob "* *.swf *"   }  # enable flash

               

                    /0061 { /type "allow" /glob "POST /content/[.]*.form.html" }  # allow POSTs to form selectors under content

                    /0062 { /type "allow" /glob "* /libs/cq/personalization/*"  }  # enable personalization

               

                    # Deny content grabbing

                    /0081 { /type "deny"  /glob "GET *.infinity.json*" }

                    /0082 { /type "deny"  /glob "GET *.tidy.json*"     }

                    /0083 { /type "deny"  /glob "GET *.sysview.xml*"   }

                    /0084 { /type "deny"  /glob "GET *.docview.json*"  }

                    /0085 { /type "deny"  /glob "GET *.docview.xml*"  }

               

                    /0086 { /type "deny"  /glob "GET *.*[0-9].json*" }

               

                    # Deny query

                    /0090 { /type "deny"  /glob "* *.query.json*" }

                    }

               

               

              with

               

              /filter

                    {

                    /0001 { /type "allow"  /glob "*" }

                    }

               

              If that works I guess you are missing some POST that you need to allow.

               

              Yogesh

              • 4. Re: CQ_Analytics is not defined on dispatcher
                contactsampeternow Level 1

                Even with global allow as you mentioned, i am still getting the same error

                • 5. Re: CQ_Analytics is not defined on dispatcher
                  orotas Level 4

                  I would do the following:

                  • Increase your dispatcher logging level to get detailed information on what dispatcher is doing for those requests - this will tell you if dispatcher is ignoring them because of a filter, if you web server isn't sending the request to dispatcher because of a configuration error in httpd.conf, if you rewrite rules that might be changing the URL for example.
                  • If you find that dispatcher is sending the request back to the publish server with the right URL check you request.log and error.log files to see what's happening when that request gets back to the publish server. Perhaps you have security misconfiguration and you gettting 403s, or perhaps the pages in question don't exist on your publish server.
                  • Compare what URLs are requested when you hit the publish server directly as opposed to through your web server - verify that the URLs are being requested and that nothing rewriting or changing them.
                  • 6. Re: CQ_Analytics is not defined on dispatcher
                    Sham HC Level 7

                    Make sure at cq side you are including personalization dependency in your design.  Clear the dispatcher cache & verify.

                    • 7. Re: CQ_Analytics is not defined on dispatcher
                      contactsampeternow Level 1

                      We do have the personalization tags included in the component. Other than that, where else is this dependency needs to be called out.

                      • 8. Re: CQ_Analytics is not defined on dispatcher
                        contactsampeternow Level 1

                        Now we are getting the error on  publish nodes = "CQ_Analytics is not defined"

                        Did anyone experience this issue?

                        Is there a way to resolve this issue.