Magento 模块验证器是否存在?
我正在编写一个模块,但我一生都无法让它工作。我过去制作了几个模块,所以我猜我在某个地方犯了一些愚蠢的错误。有谁知道是否有 Magento 模块验证器可以指出模块结构和格式的问题?
I'm writing a module and for the life of me I can't get it to work. I've made several modules in the past so I'm guessing I have some stupid mistake somewhere. Does anyone know if there's a Magento module validator out there to point out problems with a modules structure and format?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最接近的是我不久前构建的配置lint系统。虽然远不是一个成熟的验证器,但它会检查常见的配置错误并允许您编写自己的测试。
手动验证的第一个非官方步骤涉及检查 magento 管理的“禁用模块输出”部分,以查看您的模块是否正在加载。如果它没有出现在那里,则意味着您的文件有问题
。 (也许是代码池?)
The closest thing is the configuration lint system I built a while back. While far from a full fledged validator, it checks for common configuration errors and allows you to write you own test.
The first unofficial steps of manual validation involve checking the "Disable Module Output" section of the magento admin to see if your module is loading. If it doesn't show up in there, that means there's a problem with your
file. (maybe code pool?)
据我所知,没有任何验证器。有时最好的办法是启动一个新模块并慢慢重新构建它。一次不断添加非常小的功能或配置。你最终会发现什么不起作用。
使用 Magento,有很多地方可能会出错,甚至是 config.xml 文件中单词大小写不正确。我无法告诉你我犯了多少次愚蠢的错误,我花了几个小时试图弄清楚,这是拼写错误或愚蠢的事情。
祝你好运。我希望你能尽快弄清楚!
There isn't any validators that I'm aware of. Sometimes the best thing to do is to start a new module and slowly re-build it. Keep adding very small pieces of functionality or configuration at a time. You'll eventually find out what doesn't work.
With Magento, there are so many places it can go wrong, even down to improper capitalization of words in your config.xml file. I can't tell you how many times I've made dumb mistakes that I spent hours trying to figure out, and it was a misspelling or something silly.
Good luck. I hope you can figure it out soon!