問題はajaxControllerにありました。私はなぜ、jsが間違ったjson形式を送信したのかわかりません。私は少し主な行動を編集する。
public function mainAction($displayedUser = "", $postSummarys = "", $topicIcons = "", $forumIcons = "", $displayedTopics = "", $displayOnlinebox = 0, $displayedPosts = "", $displayedForumMenus = "", $displayedAds = "") {
// json array
$content = [];
if (!empty($_POST['tx_typo3forum_ajax']['displayedUser'])) {
$displayedUser = str_replace('"', '', $_POST['tx_typo3forum_ajax']['displayedUser']);
$content['onlineUser'] = $this->_getOnlineUser($displayedUser);
}
if (!empty($_POST['tx_typo3forum_ajax']['displayedForumMenus'])) {
$displayedForumMenus = str_replace('"', '', $_POST['tx_typo3forum_ajax']['displayedForumMenus']);
$content['forumMenus'] = $this->_getForumMenus($displayedForumMenus);
}
if (!empty($_POST['tx_typo3forum_ajax']['postSummarys'])) {
$postSummarys = str_replace('"', '', $_POST['tx_typo3forum_ajax']['postSummarys']);
$content['postSummarys'] = $this->_getPostSummarys($postSummarys);
}
if (!empty($_POST['tx_typo3forum_ajax']['topicIcons'])) {
$topicIcons = str_replace('"', '', $_POST['tx_typo3forum_ajax']['topicIcons']);
$content['topicIcons'] = $this->_getTopicIcons($topicIcons);
}
if (!empty($_POST['tx_typo3forum_ajax']['forumIcons'])) {
$forumIcons = str_replace('"', '', $_POST['tx_typo3forum_ajax']['forumIcons']);
$content['forumIcons'] = $this->_getForumIcons($forumIcons);
}
if (!empty($_POST['tx_typo3forum_ajax']['displayedTopics'])) {
$displayedTopics = str_replace('"', '', $_POST['tx_typo3forum_ajax']['displayedTopics']);
$content['topics'] = $this->_getTopics($displayedTopics);
}
if (!empty($_POST['tx_typo3forum_ajax']['displayedPosts'])) {
$displayedPosts = str_replace('"', '', $_POST['tx_typo3forum_ajax']['displayedPosts']);
$content['posts'] = $this->_getPosts($displayedPosts);
}
if (!empty($_POST['tx_typo3forum_ajax']['displayedPosts'])) {
$displayedPosts = str_replace('"', '', $_POST['tx_typo3forum_ajax']['displayedPosts']);
$content['posts'] = $this->_getPosts($displayedPosts);
}
if ($displayOnlinebox == 1) {
$content['onlineBox'] = $this->_getOnlinebox();
}
$displayedAds = json_decode($_POST['tx_typo3forum_ajax']['displayedAds']);
if ((int)$displayedAds->count > 1) {
$content['ads'] = $this->_getAds($displayedAds);
}
$this->view->assign('content', json_encode($content));
}
https://github.com/mittwald/typo3_forumを参照してください。たぶんあなたの問題と比較して問題またはプルリクエストがあります。そうでなければ1つを作成してください – jokumer