我有两个“相同”的 Wordpress 站点、一个本地/开发站点和一个实时站点。实时站点工作得很好,而相同的本地/开发站点(仅在最近并且没有对代码进行任何更改)开始在后端初始化 jQuery 对话框时引发致命的 JS/jQuery 错误(wp-admin) . 我无法开始猜测为什么,也不能夸大开发站点与实时站点的几乎相同(使用 Beyond Compare 差异引擎确认)。
在我的本地 WAMP 服务器 (Windows XP) 上为 Wordpress 开发了一个电子商务/簿记插件后,我将它安装在全新的 Wordpress 站点上(与 Blue Host 共享托管帐户)。
几个星期以来,新网站的进展非常顺利,当时我决定重新研究代码,对工作流程进行一些小的改进。返回我的开发服务器和站点,我震惊地发现对 jQuery UI 对话框的任何调用,开发站点都会抛出
错误:TypeError:this.hoverable 未定义
源文件:http://localhost/demox/wp-admin/load-scripts.php?c=1&load%5B%5D=hoverIntent,common,admin-bar,heartbeat,wp- auth-check,jquery-ui-widget,jquery-ui-position,wp-pointer&ver=3.6 行:17
我不能挑出任何代码供审查,特别是因为它在现场网站上都按预期工作。这是否可能是某些或其他最近的 Windows 更新导致我的 WAMP 服务器出现行为问题的结果?
FWIW这是我的开发 config.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'demox');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'l[>877xK}[.a_qkRW1&BAHAng+J[f?G|[zBDAz6Q(*_L.9KH 0@Z(Ci7^Rf=U$M}');
define('SECURE_AUTH_KEY', 'P=8if~;H.J0,}Oc0p~cgBxn=Hs$%CABheXI~,=uk$d!LguIJx72uh0Kp$mSL9`3b');
define('LOGGED_IN_KEY', 'qm-i;B]wc{i?vdSF^w;{*?5yIwkCTRY[Vza[<G=/]@,i,a-n??hAowouy?PIRp@(');
define('NONCE_KEY', '{[sr&)_-H@3-t`H]v7$/}@;:PP0tte9f>o@NMBw0;B&`_w.$xrPPem]xW)!$$6>2');
define('AUTH_SALT', '0rMsc8D8x.puf(K!.:Y%uj&j?F*.zL<01-!yikp8kIuh 6_%A>UEoZ6d|, p%N.8');
define('SECURE_AUTH_SALT', ' IKV7Bx(/,u#onKpV%,6-x=UT szLJ<S#c+P0*!|1dDyloycnTPz?Q2!CNSUQ:qa');
define('LOGGED_IN_SALT', '*T5TYMe/{kQ;j~Q#g-<r)VBlPHP%48K4:ty^=yLa76kancvTiGNZch&52]cY(~!<');
define('NONCE_SALT', '+,J0[,;uO!{w?0z7#efVvI!7{vjE7}.1T*0EgW9=K0]Nb)!j{[@0{*pHSlDu`Sub');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
* language support.
*/
define('WPLANG', '');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', true);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
define( 'CONCATENATE_SCRIPTS', false );
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');