为什么某些第 3 方模块无法正确保存管理设置?
我记录了两个模块,其中管理设置未保存在我的 Drupal 6 安装中。具体来说,我谈论的是logintoboggan 和服务链接模块。当我进行管理更改并点击“保存”,然后稍后点击“刷新”时:我的所有设置都会恢复。
为什么?
我还发现相同的代码库在我的本地开发人员上运行良好,但在服务器上不起作用。我能想到的唯一区别是我有 MYSQL 而服务器上他们有 MYSQLi。在我看来,这应该不会有什么不同。我刚刚发现的另一个区别是我的本地开发人员没有内存缓存,而服务器有。我确实注意到相关模块使用了大量的variable_get 和variable_set。同样,这些只是我注意到这样做的两个模块。
进一步缩小范围,我几乎想说variable_get() 无法正常工作。即使我在变量表中看到有效数据,variable_get 也没有正确地将其取出。
另一个发现:好吧,在其中一个模块中,有一个variable_get正在拉动正确的设置(雪橇/拒绝)或(节点/ 200),即使{variable}表设置为雪橇/拒绝? node/200 来自哪里?
There are two modules that I have documented where admin settings not get saved in my Drupal 6 installation. Specifically I am talking about logintoboggan and Service Links modules. When I make admin changes and hit save and then hit refresh later on: all my settings revert back.
Why?
I also found out that the same code base works fine on my local dev however does not work on the server. Only difference I can think of is I have MYSQL and on server they have MYSQLi. That should not make a difference in my opinion. Other difference I just found out is that my local dev does not have memcache while the server does. I did notice that the modules in question use a lot of variable_get and variable_set. Again these are just 2 modules I have noticed doing that.
Narrowed it further down in sense that I almost want to say that variable_get() is not working properly. Even though I am seeing valid data in the variable table, variable_get is not pulling it out properly.
Another finding: ok so in one of the modules there is a variable_get that is pulling either the correct setting (toboggan/denied) or (node/200) even though the {variable} table is set to toboggan/denied?
where is the node/200 coming from ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题很可能是您在内存缓存中缓存了variable_get,但没有正确地使缓存的结果无效。我会看看你如何设置缓存。
The problem is most likely that you are caching variable_get in the memcache, but aren't invalidating the cached results properly. I would take a look at how you have setup your caching.