je me sers de crayons pour faire une page de mise à jour de document
j’ai donc fait un squelette avec une bête liste de docs
en gros
<boucle_DOC{documents}>
-
....
en spip svn ça marche nickel
en spip192 rev 12150 ça plante ,(voir dessous) , le formulaire reste bloqué , un nouveau document est cependant créé (mais il n’est rattaché à rien)
voilà les détails
firebug m’affiche une erreur javascript :
(document|=={vignette}|?{’ ‹ })if (this.v…oisir une image :-) ›); this.value=’’; };
contenu retournée par le post ajax
{"$erreur":"","$html":"<form class=\"formulaire_crayon\" method=\"post\" action=\"[http://spip19.ventre](http://spip19.ventre)
.name/spip.php?action=crayons_store\" enctype=\"multipart/form-data\"><input type=\"hidden\" class=\"crayon-id
\" name=\"crayons[]\" value=\"wid488a38b6c8bf33_95008049\" />\n<input type=\"hidden\" name=\"name_wid488a38b6c8bf33_95008049
\" value=\"document-fichier-1\" />\n<input type=\"hidden\" name=\"class_wid488a38b6c8bf33_95008049\"
value=\"spip_document_1 spip_documents crayon document-fichier-1 spip_lien_ok crayon-init crayon-autorise
crayon-hover\" />\n<input type=\"hidden\" name=\"md5_wid488a38b6c8bf33_95008049\" value=\"c7746287c240aa1cc7bebde1e7c96948
\" />\n<input type=\"hidden\" name=\"fields_wid488a38b6c8bf33_95008049\" value=\"document,fichier\"
/>\n<fieldset style=\"color:rgb(51, 51, 51); font-size:16px; font-family:Verdana,Tahoma,Arial,sans-serif
; font-weight:400; line-height:21px; background-color:rgb(255, 255, 255);;\">\n<legend>\n \n\n \n \n
\n <small><img src='[http://spip19.ventre.name/dist/vignettes/txt.png?s=1217018038](http://spip19.ventre.name/dist/vignettes/txt.png?s=1217018038)' width='40' height
='40' style='vertical-align:middle;' class=' format_png' />\n \x26nbsp; remplacer ce document \n \x26nbsp
;:</small>\n\n</legend>\n\n<input class=\"crayon-active\" name=\"content_wid488a38b6c8bf33_95008049_document
\" type=\"file\"[\nonchange=\"(document|=={vignette}|?{' '})if (this.value \x26\x26 !this.value.match
(/\\.(png|jpeg|jpg|gif)$/i)) { alert('Il faut choisir une image :-)'); this.value=''; };\"] />\n\n\n
\n</fieldset><div class=\"crayon-boutons\"><div><a class=\"crayon-submit\" title=\"Enregistrer\"><img
src=\"[http://spip19.ventre.name/plugins/crayons/images/ok.png\](http://spip19.ventre.name/plugins/crayons/images/ok.png\)" width=\"20\" height=\"20\" /></a><a
class=\"crayon-cancel\" title=\"Annuler\"><img src=\"[http://spip19.ventre.name/plugins/crayons/images](http://spip19.ventre.name/plugins/crayons/images)
/cancel.png\" width=\"20\" height=\"20\" /></a></div></div></form>"}
traces dans spip.log
Jul 25 22:33:58 --monip- (pid 12433) calcul (0.02s) [plugins/crayons/controleurs/document_fichier] id_document=‹ 1 ›, crayon_type=‹ document ›, crayon_modele=‹ fichier ›, lang=‹ fr ›, key=‹ wid488a38b6c8bf33_95008049 ›, largeur=‹ 700 ›, hauteur=‹ 80 ›, self=’/spip.php?page=listedoc’, name_document=‹ content_wid488a38b6c8bf33_95008049_document ›, name_fichier=‹ content_wid488a38b6c8bf33_95008049_fichier ›, style=‹ color:rgb(51, 51, 51); font-size:16px; font-family:Verdana,Tahoma,Arial,sans-serif; font-weight:400; line-height:21px; background-color:rgb(255, 255, 255); ›, fond=‹ controleurs/document_fichier ›, date=‹ 2008-07-25 22:33:58 ›, date_redac=‹ 2008-07-25 22:33:58 › (672 octets)
Jul 25 22:34:23 -monip- (pid 27803) ajout du document my_first_project.txt (M ‹ document › T ‹ article › L ‹ 0 › D ‹ ›)
crayons. log:
Jul 25 22:34:22 81.57.245.164 (pid 27803) document_fichier_revision(1 …)
j’utilise crayons rev 21632
Rq à priori pas lié au navigateur plante sur IE , firefox 3 mac et pc.
a+
Arnaud