我有一个 modx 革命的自定义额外功能,但它抛出了错误:
[2014-06-28 15:06:21] (ERROR @ /index.php) Error 42S02 executing statement:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'db_name.modx_static_values' doesn't exist
)
我正在尝试在构造函数中添加这样的包:
if (!$this->modx->addPackage('americansurcharge',MODX_CORE_PATH.'components/americansurcharge/model/','gsi_')) {
$this->modx->log(modX::LOG_LEVEL_ERROR,'Problem adding surcharge package. ');
}
表'gsi_static_values'确实存在并且路径正确[已验证] - 此外在我的模式中:
<?xml version="1.0" encoding="UTF-8"?>
<model package="AmericanSurcharge" baseClass="xPDOObject" tablePrefix="gsi_" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="StaticValues" table="static_values" extends="xPDOSimpleObject">
....some table columns ...
</object>
</model>
表前缀“gsi_”是明确设置的。
如何修复此错误?