Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64223

Jabber output not working with PHP 7.1

    XMLWordPrintable

Details

    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-64223-master
    • Hide

      Note: You'll be testing this on Moodle 3.5 AND Moodle 3.6.

      1. Make sure you are running either PHP 7.1 or 7.2.
      2. As the admin user, run the local jabber server (https://hub.docker.com/r/rroemhild/ejabberd) configured with 2 users, and no TLS.

        docker run  --name "ejabberd" \
        -p 5222:5222   \
        -p 5269:5269   \
        -p 5280:5280   \
        -h 'xmpp.localhost'   \
        -e "XMPP_DOMAIN=localhost"  \
        -e "EJABBERD_ADMINS=admin@localhost admin2@localhost"   \
        -e "EJABBERD_USERS=admin@localhost:password1234 admin2@localhost:password4321"  \
        -e "TZ=Europe/Berlin"   \
        -e "EJABBERD_STARTTLS=false"  rroemhild/ejabberd
         

      3. In Moodle, enable Jabber and configure the server details. Set:
        • host: 'localhost'
        • Jabber server: NOT SET
        • For the username, use admin:password1234.
      4. Via 'Default message outputs' (search in admin settings for this), enable Jabber for offline AND online use for the 'Personal messages between users' row. Make sure the select is set to 'Permitted'.
      5. Create a course and enrol 2 students, student 1 and student 2.
      6. Log out.
      7. Log in as student 1.
      8. Click the notifications bell, and selected preferences (the cog).
      9. Click the cog next to Jabber int he column header.
      10. Enter 'admin2@localhost' and hit enter to link that user to student 1
      11. Open messaging pane and click the cog (If you're testing on 3.5, just open message preferences and make sure Jabber is on for both online and offline and skip the next step)
      12. Enable Jabber output (toggle to on) but leave email and other outputs disabled (we don't want these to interfere for now)
      13. Log out.
      14. Download pidgin (sudo apt-get install pidgin)
      15. Open pidgin and login using student 1's linked jabber account: admin2@localhost with pw: 'password4321'
      16. In pidgin account settings (manage accounts -> modify):
        • Under the 'Advanced' tab, set 'connection security' to 'use encryption if enabled'
        • Under the 'Proxy' tab, set 'proxy' to 'No proxy'
      17. Leave Pidgin open
      18. Now, log in to moodle as student 2
      19. Open messaging, search for student 1 and send them a message.
      20. Verify the message is sent in Moodle's UI without any error/debug popups
      21. Verify you get a message in Pidgin with the message details.
      Show
      Note: You'll be testing this on Moodle 3.5 AND Moodle 3.6. Make sure you are running either PHP 7.1 or 7.2. As the admin user, run the local jabber server ( https://hub.docker.com/r/rroemhild/ejabberd ) configured with 2 users, and no TLS. docker run --name "ejabberd" \ -p 5222 : 5222 \ -p 5269 : 5269 \ -p 5280 : 5280 \ -h 'xmpp.localhost' \ -e "XMPP_DOMAIN=localhost" \ -e "EJABBERD_ADMINS=admin@localhost admin2@localhost" \ -e "EJABBERD_USERS=admin@localhost:password1234 admin2@localhost:password4321" \ -e "TZ=Europe/Berlin" \ -e "EJABBERD_STARTTLS=false" rroemhild/ejabberd In Moodle, enable Jabber and configure the server details. Set: host: 'localhost' Jabber server: NOT SET For the username, use admin:password1234. Via 'Default message outputs' (search in admin settings for this), enable Jabber for offline AND online use for the 'Personal messages between users' row. Make sure the select is set to 'Permitted'. Create a course and enrol 2 students, student 1 and student 2. Log out. Log in as student 1. Click the notifications bell, and selected preferences (the cog). Click the cog next to Jabber int he column header. Enter 'admin2@localhost' and hit enter to link that user to student 1 Open messaging pane and click the cog (If you're testing on 3.5, just open message preferences and make sure Jabber is on for both online and offline and skip the next step) Enable Jabber output (toggle to on) but leave email and other outputs disabled (we don't want these to interfere for now) Log out. Download pidgin (sudo apt-get install pidgin) Open pidgin and login using student 1's linked jabber account: admin2@localhost with pw: 'password4321' In pidgin account settings (manage accounts -> modify): Under the 'Advanced' tab, set 'connection security' to 'use encryption if enabled' Under the 'Proxy' tab, set 'proxy' to 'No proxy' Leave Pidgin open Now, log in to moodle as student 2 Open messaging, search for student 1 and send them a message. Verify the message is sent in Moodle's UI without any error/debug popups Verify you get a message in Pidgin with the message details.

    Description

      1. Set up a working local jabber server (https://hub.docker.com/r/rroemhild/ejabberd) configuring with 2 users.
      2. In Moodle, enable jabber. and make sure to enable it for offline and online use.
      3. Under a user's notification prefs (user 1), click the cog next to Jabber.
      4. Enter username@localhost and hit enter to link that user
      5. Open messaging pane and click the cog
      6. Enable Jabber output (toggle to on)
      7. Download pidgin (sudo apt-get install pidgin)
      8. Open pidgin, create new account using username@localhost
      9. In pidgin account settings (manage accounts -> modify):
        • Under the 'Advanced' tab, set 'connection security' to 'use encryption if enabled'
        • Under the 'Proxy' tab, set 'proxy' to 'No proxy'
      10. Now, log in to moodle as another user (user 2)
      11. Send a message to user 1
      12. Notice the 'undefined' error'. You can check the xhr request to see the full stack trace.

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              jaked Jake Dallimore
              Adrian Greeve Adrian Greeve
              Jun Pataleta Jun Pataleta
              Jun Pataleta Jun Pataleta
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3/Dec/18