Just ten minutes after I received your mail, I fixed the problem !
Actually, the problem occured not only when I deleted the Category
page, but any page in my Wiki !
Here are the related configurations of my wiki:
Window XP Professional SP 2
IIS 5.1
MediaWiki: 1.7.1
MySQL: 5.0
I haven't made any changed in MediaWiki except for some configurations
in the localsettings.php file.
Here is how I got the solution.
1. I checked on the table mw_archive by phpMyAdmin and found the
ar_text field's default value is ' ' (Since I could not see any
visible characters in that field, I thought it were null string).
2. Then I tried to edit the default value of ar_text in phpMyAdmin. I
leaved the "Default" inputbox with nothing to indicate that I wanted
its default value to be null string(' '). I pushed the "Save" button
but the result page showed me that the SQL query that had been
executed was:
ALTER TABLE `mw_archive` CHANGE `ar_text` `ar_text` MEDIUMBLOB NOT NULL
, in which without the "DEFAULT ' ' " part.
3. After that, I edited ar_text's default value again. This time, I
filled the "Default" inputbox with ' '. I Saved it and phpMyAdmin
reported an error(Off course there would be an error). It said the
following SQL query had been executed unsuccessfully:
ALTER TABLE `mw_archive` CHANGE `ar_text` `ar_text` MEDIUMBLOB NOT
NULL DEFAULT ''''''
. This time, it came out with the "DEFAULT xx" part!
4. Right in the result page that reported the error, I deleted the
contents in the "Default" input box and SAVED. The result page came
out and said the following SQL query had been executed SUCCESSFULLY:
ALTER TABLE `mw_archive` CHANGE `ar_text` `ar_text` MEDIUMBLOB NOT
NULL DEFAULT ''
with the DEFAULT being set to ' ' exactly!
5. Then the ar_text error disappeared! The same problem existed with
the ar_flags field too, so I changed ar_flags's default value to ' '
in the same way.
6. Now, everything goes perfectly all right.
That is how I solved the problem I met. However, I'm still not sure
why the problem could exist anyway. Is there any error in the
MediaWiki installation code? Or other problems?
2006/8/28, Greg Sabino Mullane <greg(a)turnstep.com>om>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I created a category(Category:HowTo) in my
mediawiki and had one page
tagged to it. Then I wanna delete the page Category:HowTo when an
error accoured. It said:
A database query syntax error has occurred. This may indicate a bug in
the software. The last attempted database query was:
(SQL query hidden)
from within function "Article::doDeleteArticle". MySQL returned error
"1364: Field 'ar_text' doesn't have a default value (localhost)".
I was not able to dupliucate this. Hard to tell exactly what the problem
is, but the database does have a default value for the "ar_text" field.
Things that would help us debug:
* What version of MediaWiki are you using? What version of MySQL? Have
you made any changes to the code?
* Try setting:
$wgShowSQLErrors = true;
in your LocalSettings.php file, and let us know the exact error that
appears in place of the "(SQL query hidden)" above.
- --
Greg Sabino Mullane greg(a)turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200608272050
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFE8j4DvJuQZxSWSsgRAowJAJsElyvKMSsKVm2ZHT2ivGvx/Y0vxACfVkFs
ptbzjSo5itp6BLjSpUepsIw=
=bGSE
-----END PGP SIGNATURE-----
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l