polltopics が無い、というエラー

Contributed by: ivy on 土曜日, 9月 13 2025 @ 10:26 pm JST

Last modified on 土曜日, 9月 13 2025 @ 10:41 pm JST

アップグレードの際によくあるSQLエラーが、
polltopics
のテーブルが無い、というエラーです。
pollプラグインをインストールしていないサイトでは必ず発生します。
インストール前にデータベースに、gl_polltopicsだけ追加するか、インストールしておきます。

次のSQLをphpMyAdminで実行して不測テーブルだけ追加する方法もあります。 [code[
--
-- テーブルの構造 `gl_polltopics`
--

CREATE TABLE `gl_polltopics` (
`pid` varchar(128) NOT NULL DEFAULT '',
`topic` varchar(255) DEFAULT NULL,
`meta_description` text DEFAULT NULL,
`meta_keywords` text DEFAULT NULL,
`voters` mediumint(8) UNSIGNED DEFAULT NULL,
`questions` int(11) NOT NULL DEFAULT 0,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
`display` tinyint(4) NOT NULL DEFAULT 0,
`is_open` tinyint(1) NOT NULL DEFAULT 1,
`hideresults` tinyint(1) NOT NULL DEFAULT 0,
`commentcode` tinyint(4) NOT NULL DEFAULT 0,
`statuscode` tinyint(4) NOT NULL DEFAULT 0,
`owner_id` mediumint(8) UNSIGNED NOT NULL DEFAULT 1,
`group_id` mediumint(8) UNSIGNED NOT NULL DEFAULT 1,
`perm_owner` tinyint(1) UNSIGNED NOT NULL DEFAULT 3,
`perm_group` tinyint(1) UNSIGNED NOT NULL DEFAULT 2,
`perm_members` tinyint(1) UNSIGNED NOT NULL DEFAULT 2,
`perm_anon` tinyint(1) UNSIGNED NOT NULL DEFAULT 2,
`description` mediumtext DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- テーブルのデータのダンプ `gl_polltopics`
--

INSERT INTO `gl_polltopics` (`pid`, `topic`, `meta_description`, `meta_keywords`, `voters`, `questions`, `created`, `modified`, `display`, `is_open`, `hideresults`, `commentcode`, `statuscode`, `owner_id`, `group_id`, `perm_owner`, `perm_group`, `perm_members`, `perm_anon`, `description`) VALUES
('geeklogfeaturepoll', 'Tell us your opinion about Geeklog', 'A poll about users opinions of Geeklog.', 'Poll, Geeklog, Opinion', 0, 2, '2025-08-14 12:25:09', '2025-08-14 12:25:09', 1, 1, 1, 0, 0, 1, 30, 3, 2, 2, 2, NULL);

--
-- ダンプしたテーブルのインデックス
--

--
-- テーブルのインデックス `gl_polltopics`
--
ALTER TABLE `gl_polltopics`
ADD PRIMARY KEY (`pid`),
ADD KEY `pollquestions_qid` (`pid`),
ADD KEY `pollquestions_created` (`created`),
ADD KEY `pollquestions_display` (`display`),
ADD KEY `pollquestions_commentcode` (`commentcode`),
ADD KEY `pollquestions_statuscode` (`statuscode`);
COMMIT;
[/code]

コメント (0件)

Geeklog Site - polltopics が無い、というエラー
https://www.geeklog.jp/article.php?story=2025091322260765