OK I need to be clear on what's going on.
If yes, are you just now installing the gallery module or have you been using it for a year?
If you don't, which from the code it looks like maybe you have only one, truncate your gallery tables in the DB. There will be 2. Do you know how to do that?
yes i can post here how the tables looks like.
--
-- Dumping data for table `jr_jrgallery_item`
--
INSERT INTO `jr_jrgallery_item` (`_item_id`) VALUES
(1),
(2),
(3),
(4),
(5),
(6),
(7),
(8);
-- --------------------------------------------------------
--
-- Table structure for table `jr_jrgallery_item_key`
--
CREATE TABLE IF NOT EXISTS `jr_jrgallery_item_key` (
`_item_id` int(11) unsigned NOT NULL DEFAULT '0',
`key` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`index` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` varchar(512) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`_profile_id` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`key`,`_item_id`,`index`),
KEY `_item_id` (`_item_id`),
KEY `value` (`value`(128)),
KEY `_profile_id` (`_profile_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `jr_jrgallery_item_key`
--
INSERT INTO `jr_jrgallery_item_key` (`_item_id`, `key`, `index`, `value`, `_profile_id`) VALUES
(1, '_created', 0, '1454343515', 203),
(1, '_profile_id', 0, '203', 203),
(1, '_updated', 0, '1454583316', 203),
(2, '_updated', 0, '1465863303', 0),
(3, '_updated', 0, '1465863303', 0),
(4, '_updated', 0, '1465863303', 0),
(5, '_updated', 0, '1465863303', 0),
(6, '_updated', 0, '1465863303', 0),
(7, '_updated', 0, '1465863303', 0),
(8, '_updated', 0, '1465863303', 0),
(9, '_updated', 0, '1465863303', 0),
(10, '_updated', 0, '1465863303', 0),
(11, '_updated', 0, '1465863303', 0),
(12, '_updated', 0, '1465863303', 0),
(13, '_updated', 0, '1465863303', 0),
(14, '_updated', 0, '1465863303', 0),
(15, '_updated', 0, '1465863303', 0),
(16, '_updated', 0, '1465863303', 0),
(17, '_updated', 0, '1465863303', 0),
(18, '_updated', 0, '1465863303', 0),
(19, '_updated', 0, '1465863303', 0),
(20, '_updated', 0, '1465863303', 0),
(21, '_updated', 0, '1465863303', 0),
(22, '_updated', 0, '1465863303', 0),
(23, '_updated', 0, '1465863303', 0),
(24, '_updated', 0, '1465863303', 0),
(25, '_updated', 0, '1465863303', 0),
(26, '_updated', 0, '1465863303', 0),
(28, '_updated', 0, '1465863303', 0),
(29, '_updated', 0, '1465863303', 0),
(1, '_user_id', 0, '1', 203),
(1, 'gallery_image_extension', 0, 'jpg', 203),
(1, 'gallery_image_height', 0, '590', 203),
(1, 'gallery_image_name', 0, 'alex-bueno-2015.jpg', 203),
(1, 'gallery_image_size', 0, '26705', 203),
(1, 'gallery_image_time', 0, '1454343515', 203),
(1, 'gallery_image_type', 0, 'image/jpeg', 203),
(1, 'gallery_image_view_count', 0, '46', 203),
(2, 'gallery_image_view_count', 0, '29', 0),
(3, 'gallery_image_view_count', 0, '35', 0),
(4, 'gallery_image_view_count', 0, '31', 0),
(5, 'gallery_image_view_count', 0, '30', 0),
(6, 'gallery_image_view_count', 0, '32', 0),
(7, 'gallery_image_view_count', 0, '5', 0),
(8, 'gallery_image_view_count', 0, '8', 0),
(9, 'gallery_image_view_count', 0, '12', 0),
(10, 'gallery_image_view_count', 0, '28', 0),
(11, 'gallery_image_view_count', 0, '29', 0),
(12, 'gallery_image_view_count', 0, '26', 0),
(13, 'gallery_image_view_count', 0, '27', 0),
(14, 'gallery_image_view_count', 0, '23', 0),
(15, 'gallery_image_view_count', 0, '10', 0),
(16, 'gallery_image_view_count', 0, '5', 0),
(17, 'gallery_image_view_count', 0, '5', 0),
(18, 'gallery_image_view_count', 0, '5', 0),
(19, 'gallery_image_view_count', 0, '6', 0),
(20, 'gallery_image_view_count', 0, '8', 0),
(21, 'gallery_image_view_count', 0, '6', 0),
(22, 'gallery_image_view_count', 0, '9', 0),
(23, 'gallery_image_view_count', 0, '6', 0),
(24, 'gallery_image_view_count', 0, '6', 0),
(25, 'gallery_image_view_count', 0, '6', 0),
(26, 'gallery_image_view_count', 0, '4', 0),
(28, 'gallery_image_view_count', 0, '2', 0),
(29, 'gallery_image_view_count', 0, '1', 0),
(1, 'gallery_image_width', 0, '800', 203),
(1, 'gallery_order', 0, '1', 203),
(2, 'gallery_order', 0, '100', 0),
(3, 'gallery_order', 0, '100', 0),
(4, 'gallery_order', 0, '100', 0),
(5, 'gallery_order', 0, '100', 0),
(6, 'gallery_order', 0, '100', 0),
(7, 'gallery_order', 0, '100', 0),
(8, 'gallery_order', 0, '100', 0),
(9, 'gallery_order', 0, '100', 0),
(10, 'gallery_order', 0, '100', 0),
(11, 'gallery_order', 0, '100', 0),
(12, 'gallery_order', 0, '100', 0),
(13, 'gallery_order', 0, '100', 0),
(14, 'gallery_order', 0, '100', 0),
(15, 'gallery_order', 0, '100', 0),
(16, 'gallery_order', 0, '100', 0),
(17, 'gallery_order', 0, '100', 0),
(18, 'gallery_order', 0, '100', 0),
(19, 'gallery_order', 0, '100', 0),
(20, 'gallery_order', 0, '100', 0),
(21, 'gallery_order', 0, '100', 0),
(22, 'gallery_order', 0, '100', 0),
(23, 'gallery_order', 0, '100', 0),
(24, 'gallery_order', 0, '100', 0),
(25, 'gallery_order', 0, '100', 0),
(26, 'gallery_order', 0, '100', 0),
(28, 'gallery_order', 0, '100', 0),
(29, 'gallery_order', 0, '100', 0),
(1, 'gallery_short_url', 0, 't5Ys2AiG', 203),
(1, 'gallery_title', 0, 'General', 203),
(1, 'gallery_title_url', 0, 'general', 203);