VB5.1.3 Unable to contact server. Please try again.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Replicant
    Senior Member
    • Sep 2014
    • 527

    VB5.1.3 Unable to contact server. Please try again.

    Click image for larger version

Name:	Screenshot-2.png
Views:	277
Size:	11.4 KB
ID:	4193959

    This is a new error I started getting today on one thread in particular. It happens when the page is incremented by the arrows or the page buttons at the bottom. It puts the correct url in the browser navigation bar but throws the error. If I click in the navigation bar and hit enter, the new page loads. None of the other threads with multiple pages throws the error. I found couple other threads referencing this issue but no info on how to solve.

    Output from Firebug on one thread only.

    "vBulletin.loadingIndicator.show Counter: 1 Source: ajaxStart" footer-rollup-513.js:96
    "//www.k5blazersplus.com/forums/activity/get failed. error:SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" footer-rollup-513.js:187
    "vBulletin.loadingIndicator.hide Counter: 0 Source: ajaxStop" footer-rollup-513.js:96
    "vBulletin.loadingIndicator.show ajax indicator suppressed" footer-rollup-513.js:96
    "//www.k5blazersplus.com/forums/activity/get failed. error:SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" footer-rollup-513.js:187
    "vBulletin.loadingIndicator.hide ajax indicator suppressed" footer-rollup-513.js:96

    Output from firebug on any other thread.
    "vBulletin.loadingIndicator.show ajax indicator suppressed" footer-rollup-513.js:96
    "Intercept AJAX template render calls: Start (URL: http://www.k5blazersplus.com/forums/activity/get)" footer-rollup-513.js:96
    "Intercept AJAX template render calls: Has CSS" footer-rollup-513.js:96
    "Intercept AJAX template render calls: Needed CSS is already on the page" footer-rollup-513.js:96
    "Intercept AJAX template render calls: Calling original success handler" footer-rollup-513.js:96
    "vBulletin.loadingIndicator.hide ajax indicator suppressed" footer-rollup-513.js:96
    Attached Files


  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4021
    • 5.7.X

    #2
    Here's I would do:

    1. Turn on debug mode for your IP only (so that errors are visible only to you)

    In core/includes/config.php, add the following code:
    PHP Code:
    if($_SERVER['REMOTE_ADDR'] == "xxx.xxxx.xxx.xxx"//add your IP address here
    {
        
    $config['Misc']['debug'] = true;

    2. Reproduce the error while the debugger tool is open.

    3. In the debugger, go to Response tab of the /forums/activity/get ajax request. It should show the php error stack trace.

    From there, we can determine how to resolve the issue based on the actual error.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • Replicant
      Senior Member
      • Sep 2014
      • 527

      #3
      This is the info from the page throwing the error Debug Information

      • Page ID:
      • Parent ID:
      • Page Template ID:
      • Route ID:
      • Page Type:
      • Screen Layout ID:
      • Screen Layout Template:
      • Channel ID:
      • Node ID:
      • Database Asserts: 187 (?)
      • AJAX Requests: 3
        1. /ajax/api/node/markRead
        2. /ajax/api/node/incrementNodeview
        3. /activity/get
      • Facebook Active: No (Not enabled or no appid & secret set)
      • Style ID: 31
      • Templates/Renders: 51/116
      • CSS Templates: 10
      • Current Time: Tue, 04 Nov 2014 16:45:35 -0600




      This is a different page that is working
      Debug Information

      • Page ID:
      • Parent ID:
      • Page Template ID:
      • Route ID:
      • Page Type:
      • Screen Layout ID:
      • Screen Layout Template:
      • Channel ID:
      • Node ID:
      • Database Asserts: 112 (?)
      • AJAX Requests: 4
        1. /ajax/api/node/markRead
        2. /ajax/api/node/incrementNodeview
        3. /activity/get
        4. /ajax/render/pagenav
      • Facebook Active: No (Not enabled or no appid & secret set)
      • Style ID: 31
      • Templates/Renders: 50/185
      • CSS Templates: 10
      • Current Time: Tue, 04 Nov 2014 16:52:52 -0600





      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4021
        • 5.7.X

        #4
        Not that info. There should be an error stack trace from the ajax response when you click the pagination arrows. The stack trace should show the actual PHP error message indicating what lines the error occured from and from what files.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        • Replicant
          Senior Member
          • Sep 2014
          • 527

          #5
          You lost me. Am I looking for the stack trace in Firebug? If so where? because the only debug info I see on the page is in the box at the bottom of the page.


          Comment

          • glennrocksvb
            Former vBulletin Developer
            • Mar 2011
            • 4021
            • 5.7.X

            #6
            Yes in Firebug. In your original post, you posted the messages in the Console tab. Instead of Console tab, go to Net tab > XHR and find the /forums/activity/get ajax request after clicking the pagination arrows. Then open Response tab of that ajax request.

            Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

            Comment

            • glennrocksvb
              Former vBulletin Developer
              • Mar 2011
              • 4021
              • 5.7.X

              #7
              A short video for you on how to check the ajax response.


              Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

              Comment

              • Replicant
                Senior Member
                • Sep 2014
                • 527

                #8
                This is the first line in the response tab.
                Notice: Undefined index: moderatorperms in .../vb/library/content/gallery.php on line 131

                Other than that, looks just like the page source.


                Comment

                • glennrocksvb
                  Former vBulletin Developer
                  • Mar 2011
                  • 4021
                  • 5.7.X

                  #9
                  That's the issue

                  Code:
                  Notice: Undefined index: moderatorperms in .../vb/library/content/gallery.php on line 131
                  The support staff should be able to let us know if this is a known issue or not.

                  Line 131 is:

                  PHP Code:
                  if (!$node['content']['moderatorperms']['canviewips']) 
                  in removePrivateDataFromNode($node) function.

                  Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                  Comment

                  • Replicant
                    Senior Member
                    • Sep 2014
                    • 527

                    #10
                    Thanks Glenn. I guess now I'll wait for one of them to chime in. You've been a great help.


                    Comment

                    • glennrocksvb
                      Former vBulletin Developer
                      • Mar 2011
                      • 4021
                      • 5.7.X

                      #11
                      Glad to help.

                      There's probably more errors in the response. If you use Chrome (Network > XHR), you will see the response to be easier to check as it has a Preview tab (before Response tab) which renders the page source of the response in the Preview tab like a browser. Scroll down through the preview content to see the error stack trace.

                      Actually, Firebug has the same feature. The ajax response has HTML tab (next to Response tab) which renders the response as HTML page.
                      Last edited by glennrocksvb; Tue 4 Nov '14, 4:43pm.

                      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                      Comment

                      • Replicant
                        Senior Member
                        • Sep 2014
                        • 527

                        #12
                        I tried again with the preview method and yielded these results

                        top of page:
                        Notice: Undefined index: moderatorperms in .../vb/library/content/gallery.php on line 131

                        Body:
                        Debug: Error
                        Cannot send response, headers already sent. File: /home/k5blazer/public_html/forums/core/vb/vb.php Line: 859
                        occurred in file /home/k5blazer/public_html/forums/includes/vb5/frontend/controller.php on line 23
                        Trace
                        • Function sendAsJson in file /home/k5blazer/public_html/forums/includes/vb5/frontend/controller/activity.php line 314
                        • Function actionGet in file line
                        • Function call_user_func_array in file /home/k5blazer/public_html/forums/index.php line 72


                        Comment

                        • glennrocksvb
                          Former vBulletin Developer
                          • Mar 2011
                          • 4021
                          • 5.7.X

                          #13
                          I suggest you create a JIRA bug entry for this



                          Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                          Comment

                          • Replicant
                            Senior Member
                            • Sep 2014
                            • 527

                            #14
                            I created a JIRA on this and after supplying the requested info, this is the response.

                            Sebastiano Vassellatti closed VBV-13833. ---------------------------------------- Assignee: (was: Sebastiano Vassellatti) Resolution: Duplicate Thank you. That confirms this is indeed a duplicate of VBV-5591. That's all fine and good. What about a workaround or a fix? This is one of my more popular threads.
                            This bug is confirmed over two years ago and is caused by the content of the posts.


                            Comment

                            • Replicant
                              Senior Member
                              • Sep 2014
                              • 527

                              #15
                              Problem solved. The thread is fixed. After isolating the post that was causing the issue, it was just a matter of correcting the issue in that post and clearing the system cache.


                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...