Javascript 键入3 showClickmenu不适用于某些插件提供的项目类型

Javascript 键入3 showClickmenu不适用于某些插件提供的项目类型,javascript,plugins,typo3,Javascript,Plugins,Typo3,我有一个非常旧的Typo3插件,不久前(可能是由于Typo3升级引起的问题;我目前使用的是4.7.11),用户开始抱怨后端某些项目的上下文菜单不再工作。这种效果在某些表(不是所有表)上是有限的,但它看起来像是一类项目在工作或不工作 该插件对上下文菜单没有什么特别之处,我只希望使用编辑按钮等标准功能。我从网络搜索中了解到,后端wrt已经发生了更改。上下文菜单。然而,从错误报告中,我不清楚我必须改变什么,特别是因为我的一些东西在没有修改的情况下工作 是否有任何文档说明我需要在插件中调整哪些内容才能使

我有一个非常旧的Typo3插件,不久前(可能是由于Typo3升级引起的问题;我目前使用的是4.7.11),用户开始抱怨后端某些项目的上下文菜单不再工作。这种效果在某些表(不是所有表)上是有限的,但它看起来像是一类项目在工作或不工作

该插件对上下文菜单没有什么特别之处,我只希望使用编辑按钮等标准功能。我从网络搜索中了解到,后端wrt已经发生了更改。上下文菜单。然而,从错误报告中,我不清楚我必须改变什么,特别是因为我的一些东西在没有修改的情况下工作

是否有任何文档说明我需要在插件中调整哪些内容才能使用新的上下文菜单体系结构

提前感谢,, 克里斯托夫

PS:奇怪的是,上下文菜单在标准文件浏览器中也不起作用。这可能是相关的,但我还没有一个解决方案

编辑:对于失败的菜单,Firefox的webdev控制台会报告错误“xml或文本声明不在实体的开头”。但XML对我来说还可以:

<?xml version="1.0"?>
<t3ajax><data><clickmenu><htmltable><![CDATA[<div class="typo3-CSM-wrapperCM">

            <table border="0" cellpadding="0" cellspacing="0" class="typo3-CSM">

                <tr class="typo3-CSM-itemRow" onclick="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;edit[tx_visteaching_seminartopic][240]=edit';}Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;edit[tx_visteaching_seminartopic][240]=edit';}Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-open">&nbsp;</span></td><td class="typo3-CSM-item">Bearbeiten</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;edit[tx_visteaching_seminartopic][-240]=new';}Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;edit[tx_visteaching_seminartopic][-240]=new';}Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-new">&nbsp;</span></td><td class="typo3-CSM-item">Neu</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="top.launchView('tx_visteaching_seminartopic', '240'); Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="top.launchView('tx_visteaching_seminartopic', '240'); Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-info">&nbsp;</span></td><td class="typo3-CSM-item">Info</td>
                </tr>
                <tr class="bgColor2">
                    <td colspan="2"><img src="clear.gif" width="1" height="1" alt="" /></td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;reloadListFrame=1&amp;CB[el][tx_visteaching_seminartopic%7C240]=1&amp;CB[setCopyMode]=1');Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;reloadListFrame=1&amp;CB[el][tx_visteaching_seminartopic%7C240]=1&amp;CB[setCopyMode]=1');Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-copy">&nbsp;</span></td><td class="typo3-CSM-item">Kopieren</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;reloadListFrame=1&amp;CB[el][tx_visteaching_seminartopic%7C240]=1');Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;reloadListFrame=1&amp;CB[el][tx_visteaching_seminartopic%7C240]=1');Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-cut">&nbsp;</span></td><td class="typo3-CSM-item">Ausschneiden</td>
                </tr>
                <tr class="bgColor2">
                    <td colspan="2"><img src="clear.gif" width="1" height="1" alt="" /></td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;cmLevel=1&amp;subname=moreoptions');" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="showClickmenu_raw('/typo3/alt_clickmenu.php?table=tx_visteaching_seminartopic&amp;uid=240&amp;listFr=1&amp;enDisItems=&amp;backPath=%7Ce633b347b6&amp;addParams=&amp;ajax=1&amp;cmLevel=1&amp;subname=moreoptions');;return false;">
                    <td align="center"> </td><td class="typo3-CSM-item">Weitere Einstellungen...</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;data[tx_visteaching_seminartopic][240][hidden]=1&amp;prErr=1&amp;vC=31e89da0b5&amp;formToken=67e2328a3706432e0dd02d2f1e0923002537a3d0';}top.nav.refresh.defer(500, top.nav);Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="if(top.content.list_frame){top.content.list_frame.location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;data[tx_visteaching_seminartopic][240][hidden]=1&amp;prErr=1&amp;vC=31e89da0b5&amp;formToken=67e2328a3706432e0dd02d2f1e0923002537a3d0';}top.nav.refresh.defer(500, top.nav);Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-hide">&nbsp;</span></td><td class="typo3-CSM-item">Verbergen</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="var docRef=(top.content.list_frame)?top.content.list_frame:top.content.list_frame; docRef.location.href=top.TS.PATH_typo3+'alt_doc.php?edit[tx_visteaching_seminartopic][240]=edit&amp;columnsOnly=hidden'+'&amp;returnUrl='+top.rawurlencode(docRef.document.location.pathname+docRef.document.location.search);Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="var docRef=(top.content.list_frame)?top.content.list_frame:top.content.list_frame; docRef.location.href=top.TS.PATH_typo3+'alt_doc.php?edit[tx_visteaching_seminartopic][240]=edit&amp;columnsOnly=hidden'+'&amp;returnUrl='+top.rawurlencode(docRef.document.location.pathname+docRef.document.location.search);Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-edit-access">&nbsp;</span></td><td class="typo3-CSM-item">Sichtbarkeitseinstellungen</td>
                </tr>
                <tr class="bgColor2">
                    <td colspan="2"><img src="clear.gif" width="1" height="1" alt="" /></td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="if(top.content.list_frame &amp;&amp; confirm(String.fromCharCode(83,105,110,100,32,83,105,101,32,115,105,99,104,101,114,44,32,100,97,115,115,32,83,105,101,32,34,69,118,97,108,117,97,116,105,111,110,32,118,111,110,32,75,110,111,116,101,110,45,75,97,110,116,101,110,32,68,105,97,103,114,97,109,109,101,110,34,32,116,97,116,115,228,99,104,108,105,99,104,32,108,246,115,99,104,101,110,32,119,111,108,108,101,110,63,32,40,84,104,101,114,101,32,97,114,101,32,49,32,114,101,102,101,114,101,110,99,101,40,115,41,32,116,111,32,116,104,105,115,32,114,101,99,111,114,100,33,41)) ){top.content.list_frame.location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;cmd[tx_visteaching_seminartopic][240][delete]=1&amp;prErr=1&amp;vC=31e89da0b5&amp;formToken=67e2328a3706432e0dd02d2f1e0923002537a3d0';}top.nav.refresh.defer(500, top.nav);Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="if(top.content.list_frame &amp;&amp; confirm(String.fromCharCode(83,105,110,100,32,83,105,101,32,115,105,99,104,101,114,44,32,100,97,115,115,32,83,105,101,32,34,69,118,97,108,117,97,116,105,111,110,32,118,111,110,32,75,110,111,116,101,110,45,75,97,110,116,101,110,32,68,105,97,103,114,97,109,109,101,110,34,32,116,97,116,115,228,99,104,108,105,99,104,32,108,246,115,99,104,101,110,32,119,111,108,108,101,110,63,32,40,84,104,101,114,101,32,97,114,101,32,49,32,114,101,102,101,114,101,110,99,101,40,115,41,32,116,111,32,116,104,105,115,32,114,101,99,111,114,100,33,41)) ){top.content.list_frame.location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)+'&amp;cmd[tx_visteaching_seminartopic][240][delete]=1&amp;prErr=1&amp;vC=31e89da0b5&amp;formToken=67e2328a3706432e0dd02d2f1e0923002537a3d0';}top.nav.refresh.defer(500, top.nav);Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-delete">&nbsp;</span></td><td class="typo3-CSM-item">L&#xf6;schen</td>
                </tr>
                <tr class="typo3-CSM-itemRow" onclick="var docRef=(top.content.list_frame)?top.content.list_frame:top.content.list_frame; docRef.location.href=top.TS.PATH_typo3+'show_rechis.php?element=tx_visteaching_seminartopic%3A240'+'&amp;returnUrl='+top.rawurlencode(docRef.document.location.pathname+docRef.document.location.search);Clickmenu.hideAll();" onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';" oncontextmenu="var docRef=(top.content.list_frame)?top.content.list_frame:top.content.list_frame; docRef.location.href=top.TS.PATH_typo3+'show_rechis.php?element=tx_visteaching_seminartopic%3A240'+'&amp;returnUrl='+top.rawurlencode(docRef.document.location.pathname+docRef.document.location.search);Clickmenu.hideAll();;return false;">
                    <td align="center"> <span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-history-open">&nbsp;</span></td><td class="typo3-CSM-item">Verlauf/R&#xfc;ckg&#xe4;ngig</td>
                </tr>
            </table>
        </div>]]></htmltable><cmlevel>0</cmlevel></clickmenu></data></t3ajax>

贝尔贝滕
纽
信息
科皮耶伦
奥斯施耐登
魏特瑞·爱因斯坦。。。
韦伯根
Sichtbarkeitseinstellungen
Lö;申
Verlauf/Rü;ckg和xe4;ngig
]]>0

上下文菜单通过
AJAX
请求呈现。确保使用浏览器查看原始结果
网络检查工具
(Chrome和Firefox在这里工作得最好)。原始结果可能包含错误消息

还要确保检查
PHP错误日志


我不知道上下文菜单有任何重大更改。

您可以在class.t3lib_treeview.php文件中找到clickmenu的javascript。它使用javascript而不是ajax

    function wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1,$add$
    {
         $backPath = rawurlencode($this->backPath).'|'.t3lib_div$
         $onClick = 'if(event.stopPropagation){event.stopPropaga$
         '","'.$uid.'","'.$listFr.'","'.
          str_replace('+','%2B',$enDisItems).'","'.
          str_replace('&','&amp;',addcslashes($backPath,'"')).'",$
          str_replace('&','&amp;',addcslashes($addParams,'"')).'"$
          return $returnOnClick ? $onClick : '<a href="javascript$
                                                    htmlspecialchar$
     }
函数wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1,$add$
{
$backPath=rawurlencode($this->backPath)。“|”。.t3lib_div$
$onClick='if(event.stopPropagation){event.stopPropaga$
“,”.$uid.“,”.$listFr.“,”。
str_replace(“+”、“%2B”、$enDisItems)。“,”。
str_replace('&','&;',addcslashes($backPath,“'))。“$
str_replace('&','&;',addcslashes($addParams,“'))。”$

return$returnOnClick?$onClick:“问题不在树视图中出现,而是在列表视图中出现。列表视图是否使用相同的代码?页面树使用不同的代码,所有其他上下文菜单共享代码(AFAIK).好的,那么这对我来说不是个合适的地方,因为我对页面树没有问题,只是对其他视图有问题。我已经浏览了JavaScript并找到了AJAX请求-但老实说,内容太复杂了,我还不知道这里发生了什么。PHP日志没有显示任何错误…有一个onclick handler。没什么复杂的。它只是通过传递表和uid从服务器获取上下文菜单。好的,我使用了Firefox开发控制台,得到了一个“xml或文本声明不在实体的开头”对于AJAX响应。但是,XML数据在语法上是正确的。对我来说唯一可疑的是,在响应的开头有一个空行。但是,在文件列表的情况下,似乎根本没有响应,而只针对文件…我发现,不产生结果的请求只需要花费很长时间以HTTP 500结尾-我将进一步研究这个问题。空行通常意味着在PHP结束标记后有一些空格。但这应该没有问题。您的错误大部分来自其他方面。如果是500,您应该在错误日志中看到这一点。如果启用调试输出,那么您应该在开发控制台中看到错误而不是HTML响应。