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

Forum posts containing links not sent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.9, 1.9.5
    • Fix Version/s: 1.8.10, 1.9.6
    • Component/s: Forum
    • Labels:
      None
    • Environment:
      Linux i386, RHEL/CentOS 4.7 (PHP 4.3.9, MySQL 4.1.22)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Forum posts containing regular HTML links to external sites inside the text of the forum posting don't get sent. As far as I can tell it's the anchor tag that confuses some logic in lib/html2text.php (other HTML tags don't make trouble on my site).

      How to reproduce:

      • write forum posting
      • mark word
      • use the link button of the HTML editor and link the marked word to an arbitrary site
      • start cron.php via webbrowser to see debugging output (or wait 30+ mins)

      Results:

      • posting doesn't get sent to forum subscribers

      My observations:

      • looking at the debugging output of cron.php reveals, that the scripts stops during the forum processing stage while trying to send to the 1st subscriber of the forum with the concerning posting
      • looking in apache logfile /var/log/httpd/error_log shows that cron.php crashes with the following fatal error:
        "PHP Fatal error: Call to a member function on a non-object in /var/www/html/moodledev/lib/html2text.php on line 575"
      • in table mdl_forum_posts column 'mailed' is set to '1' for the concerning posting
      • removing the link from the posting (via regular editing of the posting), resetting the 'mailed' column to '0' and rerunning cron.php via browser sends the posting to the forum subscribers

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    21/Oct/09