Magento system.xml 缓存问题
我一直在构建一个模块并进行大量更改,没有任何问题,直到现在:
我从扩展的 system.xml 文件中删除了一个配置变量,但该字段仍在配置中。我禁用了所有缓存,刷新了所有缓存(通过 magento admin 和手动删除目录中的所有内容),但它仍然不会消失。
作为测试,我使用相同的节点名称将其添加回 system.xml 文件,但更改了标签,并且它接受了更改。我还可以通过将
设置为 0 来隐藏它。但是,在它消失后,我将其从 system.xml 文件中删除,然后它再次出现在行政。我必须想象这是一个缓存问题,但我不知道要刷新什么才能让它消失。
有什么想法吗?
I have been building a module and making numerous changes without any problems until just now:
I removed a configuration variable from my extension's system.xml file but the field is still in the config. I disabled all caching, flushed all caches (both through magento admin and by manually deleting everything in the directories) but it STILL won't go away.
As a test, I added it back to the system.xml file using the same node name but changing the label and it picked up the change. I was also able to hide it by setting <show_in_...>
to 0. However, after it went away, I removed it from the system.xml file and it showed up again in the admin. I have to imagine this is a caching issue but I can't figure out what to flush to make it go away.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两件事需要检查。当您保存配置值时,magento(当前)将其保存到
core_config_data
表中。即使您从system.xml
配置中删除配置字段。该路径/值对仍将存储在该数据库中。执行一下以查看其中是否还有值。如果是,调用
Mage::getStoreConfig
仍将返回一个值,无论system.xml
中的内容如何。其次,Magento 允许您为每个存储存储一个默认值。
config.xml
中的配置路径。 在节点下查找与您的配置路径匹配的嵌套树路径。如果此节点存在,则针对
Mage::getStoreConfig
的请求将返回该值。Two things to check. When you save a configuration value, magento (currently) persists it to the
core_config_data
table. Even if you remove the configuration field from yoursystem.xml
config. that path/value pair will still be stores in this database. Do aTo see if there's still a values in there. If it is, calls to
Mage::getStoreConfig
will still return a value, again regardless of what's insystem.xml
Secondly, Magento allows you to stores a default value for each configuration path in
config.xml
. Look under thenode for a nested tree path that matches your configuration path. If this node is present then this value will be returned for requests to
Mage::getStoreConfig
.system.xml 值存储在数据库中,
core_config_data
:您已将其删除吗?system.xml values are stored in the db,
core_config_data
: have you delete it there?