Site statistics and categories screwed up

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Site statistics and categories screwed up

Gerrit Holl
Hello,

My harddisc crashed and all I was able to recover was an old cur table.
I installed Mediawiki 1.4, loaded the cur_table, upgraded to the newest
version, and my wiki is working again. However, there are two problems:

    * It says there are 0 articles
    * All categories seem empty

mysql> select * from site_stats;
+-----------+----------------+----------------+------------------+----------------+----------+-----------+
| ss_row_id | ss_total_views | ss_total_edits | ss_good_articles | ss_total_pages | ss_users | ss_admins |
+-----------+----------------+----------------+------------------+----------------+----------+-----------+
|         1 |            346 |             18 |                0 |           2468 |        2 |        -1 |
+-----------+----------------+----------------+------------------+----------------+----------+-----------+
1 row in set (0.00 sec)
mysql> select * from categorylinks limit 5;
+---------+-----------------+-------------+---------------------+
| cl_from | cl_to           | cl_sortkey  | cl_timestamp        |
+---------+-----------------+-------------+---------------------+
|    1918 | Persoon         | Ddofborg    | 2006-01-12 23:52:23 |
|    1236 | Recept          | Recept      | 2006-01-12 23:52:08 |
|       1 | Alles           | Hoofdpagina | 2006-01-12 23:51:51 |
|    1256 | Communicatie    | Jabber      | 2006-01-12 23:52:09 |
|     929 | Eten_en_drinken | Eten        | 2006-01-12 23:52:00 |
+---------+-----------------+-------------+---------------------+
5 rows in set (0.00 sec)

(it continues like this)

I ran rebuildall.php. init_stats.php give a database error:
$ php initStats.php
wikidb: setting edits 2568, pages 417
A database error has occurred
Query: INSERT  INTO `site_stats` (ss_row_id,ss_total_views,ss_total_edits,ss_good_articles) VALUES ('1','0','2568','417')
Function: Database::insert
Error: 1062 Duplicate entry '1' for key 1 (localhost)

Backtrace:
GlobalFunctions.php line 451 calls wfBacktrace()
Database.php line 408 calls wfDebugDieBacktrace()
Database.php line 358 calls DatabaseMysql::reportQueryError()
Database.php line 948 calls DatabaseMysql::query()
initStats.php line 23 calls DatabaseMysql::insert()

Any hints?

regards,
Gerrit.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Site statistics and categories screwed up

Jan-62
Just a few days ago, I could solve these two problems (with help from a
MediaWiki-mailinglist  ;-)

Empty categorys:
Execute in folder maintenance the follwing command on your webservers commandline:
php refreshLinks.php
If your havent got access to the webserver by commandline, you only can try the
skript "phpShell" ... for me, phpShell works :)
Now all articles are assigned correctly to their categories.

0 articles (and the rest of Special:Statistics
FIRST: Open Adminsettings.sample, type in the DB-Login, and save as described.
Then execute the command: "php Init_stats.php"

When you get an error (and the statistics have not been repaired), try this:
In the database does exist an row with key=1, so that init_stats.php cant
"INSERT" the values into the table "wiki_site_stats". So I droped the first row
from the table "wiki_site_stats" in phpMyAdmin.
Then execute
php Init_stats.php
again. For me, it works :-)

btw, does your fulltext search in the wiki work?
If not:
"maintenance/"
php rebuildall.php
amd
php rebuildtextindex.php

Regards,
Jan



Gerrit Holl schrieb:

> Hello,
>
> My harddisc crashed and all I was able to recover was an old cur table.
> I installed Mediawiki 1.4, loaded the cur_table, upgraded to the newest
> version, and my wiki is working again. However, there are two problems:
>
>     * It says there are 0 articles
>     * All categories seem empty
>
> mysql> select * from site_stats;
> +-----------+----------------+----------------+------------------+----------------+----------+-----------+
> | ss_row_id | ss_total_views | ss_total_edits | ss_good_articles | ss_total_pages | ss_users | ss_admins |
> +-----------+----------------+----------------+------------------+----------------+----------+-----------+
> |         1 |            346 |             18 |                0 |           2468 |        2 |        -1 |
> +-----------+----------------+----------------+------------------+----------------+----------+-----------+
> 1 row in set (0.00 sec)
> mysql> select * from categorylinks limit 5;
> +---------+-----------------+-------------+---------------------+
> | cl_from | cl_to           | cl_sortkey  | cl_timestamp        |
> +---------+-----------------+-------------+---------------------+
> |    1918 | Persoon         | Ddofborg    | 2006-01-12 23:52:23 |
> |    1236 | Recept          | Recept      | 2006-01-12 23:52:08 |
> |       1 | Alles           | Hoofdpagina | 2006-01-12 23:51:51 |
> |    1256 | Communicatie    | Jabber      | 2006-01-12 23:52:09 |
> |     929 | Eten_en_drinken | Eten        | 2006-01-12 23:52:00 |
> +---------+-----------------+-------------+---------------------+
> 5 rows in set (0.00 sec)
>
> (it continues like this)
>
> I ran rebuildall.php. init_stats.php give a database error:
> $ php initStats.php
> wikidb: setting edits 2568, pages 417
> A database error has occurred
> Query: INSERT  INTO `site_stats` (ss_row_id,ss_total_views,ss_total_edits,ss_good_articles) VALUES ('1','0','2568','417')
> Function: Database::insert
> Error: 1062 Duplicate entry '1' for key 1 (localhost)
>
> Backtrace:
> GlobalFunctions.php line 451 calls wfBacktrace()
> Database.php line 408 calls wfDebugDieBacktrace()
> Database.php line 358 calls DatabaseMysql::reportQueryError()
> Database.php line 948 calls DatabaseMysql::query()
> initStats.php line 23 calls DatabaseMysql::insert()
>
> Any hints?
>
> regards,
> Gerrit.
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Site statistics and categories screwed up

Jan-62
In reply to this post by Gerrit Holl
Additional, to my previous mail:

> I ran rebuildall.php. init_stats.php give a database error:
> Error: 1062 Duplicate entry '1' for key 1 (localhost)

Delele this entry manually in the database, using phpMYAdmin. But remember the
value of ss_total_views.
Run Init_stats.php (or rebuild all).
Then edit the DB again with phpMyAdmin, and set ss_total_views.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Image does not show.

Hans Hoogers - Scramble
In reply to this post by Gerrit Holl
All,

I'm a bit flabergasted here..... I've more or less sorted out why it
happens, though the reason behind it eludes me.
I'm not sure whether it something for this list, but maybe it helps
somebody who has run accross the same problem.

Last night I uploaded a couple of smaller images to my Wiki (which is
still in the making). But when looking at the image page, it didn't show
the image, only the description.
Neither would the image show on any page I wanted to use it on.....
But as it was pretty late, I called it a day with the intention to look
at it again today.

But today, at work I had a look at the same image page again, and
suddenly the image DID show ............


OK, to make a long story short; at home I have Norton Personal Firewall
which blocks those images as it sees them as adverts, apparently because
ot the size declaration; From the log file: "reason: width=88
height=30". I think it is blocked because both the width and height are
given, but I stand to be corrected on this.

And when I turned the 'Suppress banner ads" feature off (or whatever it
is called in the English version), the image did show.......

Hope this helps.

Hans


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Site statistics and categories screwed up

Rob Church
In reply to this post by Jan-62
To clear this up, the cause of the database error should now be fixed
in initStats.php in both HEAD and on the release branch.


Rob Church

On 13/01/06, Jan <[hidden email]> wrote:

> Additional, to my previous mail:
>
> > I ran rebuildall.php. init_stats.php give a database error:
> > Error: 1062 Duplicate entry '1' for key 1 (localhost)
>
> Delele this entry manually in the database, using phpMYAdmin. But remember the
> value of ss_total_views.
> Run Init_stats.php (or rebuild all).
> Then edit the DB again with phpMyAdmin, and set ss_total_views.
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l