Announcement

Collapse
No announcement yet.

Invalid response from the server when submitting post and images (always)

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

  • Invalid response from the server when submitting post and images (always)


    Hi,

    when sending a new post to the forum we get this error always:


    Click image for larger version

Name:	error_foro.png
Views:	39
Size:	14.0 KB
ID:	4339107

    "Invalid response from the server"

    I have looked for the error in apache logs, but I've found nothing. In the access logs these POSTs are sent:


    XX.XX.XX.XX - - [29/Feb/2016:09:06:26 +0100] "POST /forum/create-content/text/ HTTP/1.1" 200 742 "https://www.mysite.com/forum/forum/ayuda/ayuda-y-sugerencias-sobre-el-foro/232466-error-en-el-servidor" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0"
    XX.XX.XX.XX - - [29/Feb/2016:09:06:26 +0100] "POST /forum/create-content/loadnewposts HTTP/1.1" 200 12082 "https://www.mysite.com/forum/forum/ayuda/ayuda-y-sugerencias-sobre-el-foro/232466-error-en-el-servidor" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0"

    The new posts are written correctly, but the page is not reloaded. If you refresh the page you can see your new post there.


    vBulletin 5.2.0 Patch Level 1
    Apache v2.4.10
    Mysql 5.5.47
    PHP 5.6.17

    Thanks for your help,


  • #2

    Could anyone help me with this issue please? How can I debug this error?

    Comment


    • #3
      Can you please try running these queries?

      DELETE FROM cache
      DELETE FROM cacheevent

      NOTE: Do not run DELETE queries on any other table - you will break your site.
      MARK.B | vBULLETIN SUPPORT

      TalkNewsUK - My vBulletin 5.5.2 Demo
      AdminAmmo - My Cloud Demo

      Comment


      • #4
        Thanks for your response Mark.B . I've truncated both tables, but unfortunately the error persists in every new post.

        Comment


        • #5
          Turn on debug mode in the config. Then try it again while the debugger tool (F12) is open and check the ajax response in the Network tab. The loadnewposts ajax request was expecting a JSON response but it returned an HTML markup. The HTML returned should contain the php error stack trace.

          GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

          Comment


          • #6
            Hi Glenn Vergara, I used the debugger tool as you said with debug mode enabled, this is the info I got (IP and site has been changed), I don't see any error there?


            Code:
            General
            Request URL:https://www.mysite.com/foro/create-content/loadnewposts
            Request Method:POST
            Status Code:200 OK
            Remote Address:AA.BB.CC.DD:443

            Code:
            Response Headers
            view source
            Cache-Control:max-age=0,no-cache,no-store,post-check=0,pre-check=0
            Connection:Close
            Content-Length:0
            Content-Type:application/json; charset=UTF-8
            Date:Tue, 01 Mar 2016 22:16:03 GMT
            Expires:Sat, 1 Jan 2000 01:00:00 GMT
            Last-Modified:Tue, 01 Mar 2016 22:16:03 GMT
            Pragma:no-cache
            Server:Apache/2.4.10 (Debian)
            X-Powered-By:PHP/5.6.17-0+deb8u1
            X-UA-Compatible:IE=edge,chrome=1
            Code:
            Request Headers
            view source
            Accept:application/json, text/javascript, */*; q=0.01
            Accept-Encoding:gzip, deflate
            Accept-Language:es,en;q=0.8,en-GB;q=0.6
            Authorization:Basic YWRtaW46M0tEeWVGZXJ6WTdZ
            Connection:keep-alive
            Content-Length:453
            Content-Type:application/x-www-form-urlencoded; charset=UTF-8
            Cookie:__utma=78049542.447397439.1448102167.1454797629.1454797629.1; __utmc=78049542; __utmz=78049542.1454797629.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); bblastvisit=1456867804; _gat=1; bblastactivity=1456870534; bbsessionhash=f0b9a609304a8be39ea89bd6299ab71d; _ga=GA1.2.447397439.1448102167
            Host:www.mysite.com
            Origin:https://www.mysite.com
            Referer:https://www.mysite.com/foro/forum/foro-privado/mantenimiento-foro/5367-nueva-era-mysite-2011?_=1456870536298
            User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
            X-Requested-With:XMLHttpRequest
            Form Data
            view source
            view URL encoded
            parentid:5367
            channelid:30
            newreplyid:232481
            loadednodes[]:5367
            loadednodes[]:141103
            loadednodes[]:141105
            loadednodes[]:142393
            loadednodes[]:142406
            loadednodes[]:142659
            lastpublishdate:1307541446
            lastloadtime:1456870535
            pageload_servertime:1456870535
            view:thread
            currentpage:1
            pagetotal:1
            postcount:6
            postsperpage:15
            commentsperpage:25
            past_page_limit_aware:false
            securitytoken:1456870535-c65109c40568537d26359d7d5d1c9aff7abafb6b

            Comment


            • #7
              You only got the content of the Headers tab but not the Response tab which contains the response text from the server.

              GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

              Comment


              • #8
                The Response tab is empty, I got "SyntaxError: JSON.parse: unexpeted end of data at line 1 column 1 of the JSON data" because it is empty. You can see it too in the Content-Lenght of the response header.

                Comment


                • #9
                  Could it be for some problem in the database? A few days ago I had to repair some tables.

                  Comment


                  • #10
                    After viewing the code in the function sendAsJson (includes/vb5/frontend/controller.php) I've managed to solve the issue converting all the database content to UTF-8.
                    I had the database in latin1 and it seems that the the funciontion sendAsJson was not properly handling the charset because it was not doing the conversion to UTF-8 before calling jsonEncode function.

                    May be it was a configuration mistake somewhere, but I havenít had this issue before v5.2.

                    Now, after converting the database charset everything is running Ok.

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X