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

Cron crash fetching external blog entries

XMLWordPrintable

    • PostgreSQL
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • wip-mdl-30521
    • Hide

      Change the field type from fields "uniquehash" and "subject" from "varchar(128)" to "text"

      Show
      Change the field type from fields "uniquehash" and "subject" from "varchar(128)" to "text"
    • Hide

      Step 1:

      1. Install a stable 1.9 site and upgrade it to 2.1 integration
      2. In the database check post.uniquehash is 255 chars
      3. Perform step 2 on this branch
      4. Install a stable 1.9 site and Upgrade it to 2.2 integration
      5. In the database check post.uniquehash is 255 chars
      6. Perform step 2 on this branch
      7. Install a stable 2.2 site and upgrade it to integration master
      8. In the database check post.uniquehash is 255 chars
      9. Perform step 2 on this branch

      Step 2:

      1. Log in as admin
      2. Enable external blogs (Site administration -> Appearance -> Blog)
      3. Add external blog in your profile http://feeds.feedburner.com/ElBlogDeEnriqueDans (My profile settings -> Blogs -> External blogs)
      4. run cron
      5. It should not crash, keep an eye on error logs.
      6. Do the above in 21, 22, and master
      Show
      Step 1: Install a stable 1.9 site and upgrade it to 2.1 integration In the database check post.uniquehash is 255 chars Perform step 2 on this branch Install a stable 1.9 site and Upgrade it to 2.2 integration In the database check post.uniquehash is 255 chars Perform step 2 on this branch Install a stable 2.2 site and upgrade it to integration master In the database check post.uniquehash is 255 chars Perform step 2 on this branch Step 2: Log in as admin Enable external blogs (Site administration -> Appearance -> Blog) Add external blog in your profile http://feeds.feedburner.com/ElBlogDeEnriqueDans (My profile settings -> Blogs -> External blogs) run cron It should not crash, keep an eye on error logs. Do the above in 21, 22, and master

      Cron crashes when fetching external blog entries (errors in Spanish):

      Fetching external blog entries...
      Default exception handler: Error al escribir a la base de datos
      Debug: ERROR: value too long for type character varying(128)
      INSERT INTO mdl_post (userid,module,content,uniquehash,publishstate,format,subject,summary,created,lastmodified) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) RETURNING id
      [array (
      'userid' => '231',
      'module' => 'blog_external',
      'content' => '4',
      'uniquehash' => 'http://feedproxy.google.com/~r/ElBlogDeEnriqueDans/~3/q2GdlIn_5Rc/la-censura-en-nombre-del-copyright-supone-una-violacion-de-los-derechos-fundamentales.html',
      'publishstate' => 'site',
      'format' => '1',
      'subject' => 'La censura en nombre del copyright supone una violación de los derechos fundamentales',
      'summary' => 'Mientras una filtración asegura que en España intentan aprovechar los “minutos de la basura” del gobierno en funciones para darle el último empujón a una ley Sinde absurda que nunca debió llegar a iniciar su tramitación, desde Europa al menos nos llegan buenas noticias: el Tribunal de Justicia de la Unión Europea (ECJ) ha determinado [...]',
      'created' => 1322120525,
      'lastmodified' => 1322120525,
      )]

      • line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      • line 781 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      • line 833 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      • line 252 of /blog/lib.php: call to pgsql_native_moodle_database->insert_record()
      • line 410 of /lib/cronlib.php: call to blog_sync_external_entries()
      • line 61 of /admin/cli/cron.php: call to cron_run()

      !!! Error al escribir a la base de datos !!!

      The problem seems clear... When inserting the "uniquehash" field, the text is longer than 128 chars. In fact, we think this would happen with almost all RSS URLs, because they are generated with the title of the blog post (and the title can be very long!).

      We are considering changing the field type to "text", because this probably would resolve the problem (PostgreSQL doesn't allow to "alter column" increasing the size).

      This issue may affect the "subject" field too.

      The issue is reported as "Blocker" because, since the cron crashes, no RSS feeds are updated...

            rajeshtaneja Rajesh Taneja
            clopezm Carlos Lopez
            Jason Fowler Jason Fowler
            Sam Hemelryk Sam Hemelryk
            Gerard Caulfield Gerard Caulfield
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.