-
Bug
-
Resolution: Fixed
-
Blocker
-
2.1.2
-
PostgreSQL
-
MOODLE_21_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
wip-mdl-30521
-
-
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...