Loading...
 
Skip to main content

Architecture / Installation


Image Gallery Error Message

Just got TikiWiki up and running yesterday. What an incredible piece of software! Very impressed.

I've got one error message when configuring Image Gallery options. If I click on the "Admin (click!)" link (not the "::"), then on "Image Gallery", the bottom cluster of options (concerning comments) generates an error whenever I click on the "Change Preferences" button. I get the following error message: I am using version v1.8.3 (CVS) -Polaris-. Installed by RPM tikiwiki-1.8.3-1.noarch.rpm.

Warning: mysql error: Duplicate entry 'image_galleries_comments_default_orderin' for key 1 in query:
insert into `tiki_preferences`(`name`,`value`) values(?,?)
in /www/html/tiki/lib/tikidblib.php on line 133

Fatal error: Call to a member function on a non-object in /www/html/tiki/lib/tikidblib.php on line 151

I searched for 'image_galleries_comments_default_orderin' here and got no hits. Any suggestions?

Also, what is the default theme that is used here at tikiwiki.org?

Regards,
Skip

Default theme is tiki.css

What version of MySQL are you using?

Damian


mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

PHP 4.3.9 (cgi) (built: Sep 27 2004 12:18:58)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Fedora Core 3


It is a 1.8 bug. It has been fixed in 1.9 by replacing image_galleries_comments_default_orderin with image_galleries_comments_default_ordering
I don't know if it is easy to backport as it involve database change
A quick hack is to modify the database with phpmyadmin. Delete the line with a name image_galleries_comments_default_orderin in tiki_preferences.
sylvie

These is a good little trick you can do. I'll commit a hacky change later when I get some time.

Damian

My database doesn't have a field with that name. Anyone seen an tikiwiki RPM version 1.9?

mysql> describe tiki_preferences;

+---+----+--+-+---+---+

| Field | Type | Null | Key | Default | Extra |

+---+----+--+-+---+---+

| name | varchar(40) | | PRI | | |
| value | varchar(250) | YES | | NULL | |

+---+----+--+-+---+---+

2 rows in set (0.03 sec)

Skip

The RPM will only appear for 1.9 when its actually released. the currently 1.9's are developers code only and should not be used on live/production sites.

Damian

A line with the field name = "image_galleries_comments_default_orderin", not a field image_galleries_comments_default_orderin

Sylvie, I just want to be sure I understand. I don't want to break anything. Are you suggesting that I edit the files that have "_ordering" to "_orderin"? If I change the source here, I shouldn't have to modify the database. Right?

root@pelorus tiki# grep image_galleries_comments_default_orderin * -R
db/tiki-1.8-mssql.sql:INSERT INTO "tiki_preferences" ("name","value") VALUES ('image_galleries_comments_default_orderin','points_desc')
db/tiki-1.8-sqlite.sql:INSERT INTO "tiki_preferences" ("name","value") VALUES ('image_galleries_comments_default_orderin','points_desc');
db/tiki.sql:INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('image_galleries_comments_default_orderin','points_desc');
db/tiki-1.8-pgsql.sql:INSERT INTO "tiki_preferences" ("name","value") VALUES ('image_galleries_comments_default_orderin','points_desc');
db/tiki-1.8-oci8.sql:INSERT INTO "tiki_preferences" ("name","value") VALUES ('image_galleries_comments_default_orderin','points_desc');
db/tiki-1.8-sybase.sql:INSERT INTO "tiki_preferences" ("name","value") VALUES ('image_galleries_comments_default_orderin','points_desc')
db/tiki_1.7to1.8.sql:INSERT /* IGNORE */ INTO tiki_preferences (name, value) VALUES ('image_galleries_comments_default_orderin', 'points_desc');
db/tiki-1.8-mysql.sql:INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('image_galleries_comments_default_orderin','points_desc');
db/profiles/default-inserts.sql:INSERT INTO tiki_preferences VALUES ('image_galleries_comments_default_orderin','points_desc');
templates/tiki-admin-include-gal.tpl:
templates/tiki-admin-include-gal.tpl: Newest first{/tr}
templates/tiki-admin-include-gal.tpl: Oldest first{/tr}
templates/tiki-admin-include-gal.tpl: Points{/tr}
templates_c/en/%%-95/%%-955371940/tiki-admin-include-gal.tpl.php:
templates_c/en/%%-95/%%-955371940/tiki-admin-include-gal.tpl.php: selected="selected">Newest first
templates_c/en/%%-95/%%-955371940/tiki-admin-include-gal.tpl.php: selected="selected">Oldest first
templates_c/en/%%-95/%%-955371940/tiki-admin-include-gal.tpl.php: selected="selected">Points
tiki-admin_include_gal.php: if %22image_galleries_comments_default_ordering%22" class="wiki wikinew text-danger tips isset">$_REQUEST%22image_galleries_comments_default_ordering%22 {
tiki-admin_include_gal.php: "image_galleries_comments_default_ordering", $_REQUEST%22image_galleries_comments_default_ordering%22);
tiki-admin_include_gal.php: $smarty->assign('image_galleries_comments_default_ordering', $_REQUEST%22image_galleries_comments_default_ordering%22);
tiki-browse_gallery.php: $comments_default_ordering = $image_galleries_comments_default_ordering;
tiki-browse_gallery.php: $comments_default_ordering = $image_galleries_comments_default_ordering;
tiki-setup.php:$image_galleries_comments_default_ordering = 'points_desc';
tiki-setup.php:$smarty->assign('image_galleries_comments_default_ordering', $image_galleries_comments_default_ordering);

No don't do that... it is not so simple
The only thing you have to do .. at least the error dissapeared for me is:

DELETE FROM `tiki_preferences` WHERE `name`='image_galleries_comments_default_orderin';

It is not dangerous to change this table.

I don't have enough time today to backport 1.9, and Damian already said he will do it today