- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在激活 plone.app.multilingual 的情况下运行 Plone 5.0.5 版我注意到站点地图行为异常。
如果我转到 mysite.com/en-gb/sitemap,我会得到该语言的站点地图 View ,很好。
如果我转到 mysite.com/en-gb/sitemap.xml.gz,下载并解压缩文件 .xml 文件,我会得到一个空站点地图(请参阅下面的文件内容):
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
</urlset>
如果我访问 mysite.com/sitemap.xml.gz,我会得到相同的站点地图。控制面板
我已经尝试检查“语言”部分,但我在那里看不到与站点地图相关的任何内容。我当然确保在“站点”中勾选了“Expose sitemap.xml.gz”。门户目录
我尝试清除并重建目录,但无济于事。collective.linguasitemap
尝试安装它,但我认为它不适用于 Plone 5.0.5。当我尝试在这个 Plone 5.0.5 站点上安装它时,buildout 一切顺利,但在尝试加载我的客户端时我得到以下信息:
Traceback (most recent call last):
File "/opt/plone/z01/parts/client1/bin/interpreter", line 302, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
self.startZope()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
Zope2.startup()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 118, in startup
load_zcml()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
load_site()
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
_context = xmlconfig.file(site_zcml)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
include(context, name, package)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/opt/plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/OFS/metaconfigure.py", line 46, in loadProducts
xmlconfig.include(_context, zcml, package=product)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 705, in finish
args = toargs(context, *self.argdata)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 1397, in toargs
args[str(name)] = field.fromUnicode(s)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/fields.py", line 227, in fromUnicode
v = vt.fromUnicode(s)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/fields.py", line 137, in fromUnicode
value = self.context.resolve(name)
File "/opt/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 179, in resolve
mod = __import__(mname, *_import_chickens)
File "/opt/plone/buildout-cache/eggs/Products.LinguaPlone-4.1.5-py2.7.egg/Products/LinguaPlone/browser/controlpanel.py", line 6, in <module>
from plone.app.controlpanel.language import LanguageControlPanel as BasePanel
File "/opt/plone/buildout-cache/eggs/plone.app.controlpanel-3.0.4-py2.7.egg/plone/app/controlpanel/language.py", line 3, in <module>
from Products.CMFPlone.interfaces import ILanguageSelectionSchema # noqa
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/opt/plone/z01/parts/client1/etc/site.zcml", line 16.2-16.23
ZopeXMLConfigurationError: File "/opt/plone/buildout-cache/eggs/Products.ATContentTypes-2.2.12-py2.7.egg/Products/ATContentTypes/configure.zcml", line 8.2-9.44
ZopeXMLConfigurationError: File "/opt/plone/buildout-cache/eggs/Products.LinguaPlone-4.1.5-py2.7.egg/Products/LinguaPlone/configure.zcml", line 9.2-9.31
ZopeXMLConfigurationError: File "/opt/plone/buildout-cache/eggs/Products.LinguaPlone-4.1.5-py2.7.egg/Products/LinguaPlone/browser/configure.zcml", line 12.2-12.70
ImportError: cannot import name ILanguageSelectionSchema
我们还有一些其他的 Plone 5.0.5 站点仍然可以毫无问题地创建 sitemap.xml.gz 文件。它似乎只影响安装了 multilang 的站点。
有什么明显的我做错了吗,或者任何人都可以阐明这个问题吗?
提前致谢!
最佳答案
这是一个已经解决的错误。
关于Plone Multilang 站点地图是空的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40178298/
leaflet:一个开源并且对移动端友好的交互式地图 JavaScript 库 中文文档: https://leafletjs.cn/reference.html 官网(英文): ht
我是一名优秀的程序员,十分优秀!