Problem when adding questions (auto save infinite attempts to connect to server)

Problem when adding questions (auto save infinite attempts to connect to server)

by seme Se -
Number of replies: 7

I'm using latest version of Moodle (2.9)

When attempting to create a multiple choice question, the page becomes suddenly slow and several small yellow boxes appear saying "could not connect to server" and that any work done would not be autosaved. 


When opening the console window in the browser (Latest Google Chrome), the window in the following image appears. 


There seems to be a large number of attempts to connect the to server. The server is not public (my private pc) and nothing else is running on the server.


Any idea how to fix this ?

Average of ratings: -
In reply to seme Se

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If is a bug (MDL-48756) with Atto auto-save that I cannot interest anyone it trying to fix.

In reply to Tim Hunt

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by seme Se -

The problem I am facing happens with both Google Chrome and Microsoft Edge. Opening/closing the Developer Console window does not have an effect on the problem. I only opened it to illustrate the problem I am facing. 


In other words, the automatic Autosafe requests shown in the console do not stop even when I stop typing. The requests number (shown in red in the top right corner of the console window as illustrated in the image above) reached a number above 20 thousand and the page eventually crashed. 

In reply to seme Se

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by seme Se -

I just checked and the response I am getting for most of the requests is the following:



{"error":"Course or activity not accessible.","stacktrace":null,"debuginfo":null,"reproductionlink":null}

In reply to seme Se

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by seme Se -

The form data for each request is as follow (as taken from Chrome Developer Tools ):


    1. sesskey:
      RTdm5t1FXg
    2. contextid:
      26
    3. action:
      save
    4. drafttext:
      <p>اختر الاجابة الصحيحة من الاجابات التالية</p>
    5. elementid:
      id_questiontext
    6. pagehash:
      3bf09246b934f1b71284233690b4c0c0da65940d
    7. pageinstance:
      yui_3_17_2_2_1443740173912_398
Name


In reply to seme Se

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by seme Se -

The request header is as follow ( I apologize for breaking up the posts as Moodle detected it as spam when I placed all the details of the request header in a single post): 


    1. Accept:
      */*
    2. Accept-Encoding:
      gzip, deflate
    3. Accept-Language:
      en-US,en;q=0.8
    4. Connection:
      keep-alive
    5. Content-Length:
      416
    6. Content-Type:
      application/x-www-form-urlencoded; charset=UTF-8
    7. Cookie:
      MOODLEID1_=%2517H%25D2%25E9%25F7; MoodleSession=jnlhi8ds3vnh5he3dq4rsfi161
    8. Host:
      192.168.1.108
    9. Origin:
    10. Referer:
    11. User-Agent:
      Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
    12. X-Requested-With:
      XMLHttpRequest
  1. Form Dataview sourceview URL encoded

In reply to seme Se

Re: Problem when adding questions (auto save infinite attempts to connect to server)

by Paul Nicholls -

This does not sound like the issue which Tim mentioned.  I can't replicate it on my Moodle 2.9 test site though, so it may be something specific to your site's setup.

The specific error you're getting suggests that you don't have access to the course or activity for some reason - it's the require_login call which is throwing the error.  What steps are you following to add a multiple choice question, and what role(s) does the user you're logged in as have in the course?

In reply to seme Se

Tárgy: Problem when adding questions (auto save infinite attempts to connect to server)

by György Horváth -

Hi All!


I have similar problem during adding any kind of question to a course test (version 2.9 on windows server).

Did anybody solve the problem?


Thank's a lot !


George