diff --git a/CHANGES.rst b/CHANGES.rst index a29c25bf..a3062d5c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,8 +4,7 @@ Changelog 9.3.1 (unreleased) ------------------ -- Nothing changed yet. - +- Fix creating a fresh site in Plone 6.1 when registry does not exist yet. Fixes #378 [pbauer] 9.3.0 (2024-02-15) ------------------ diff --git a/plone-6.0.x.cfg b/plone-6.0.x.cfg index 6e0f5510..825f1e21 100644 --- a/plone-6.0.x.cfg +++ b/plone-6.0.x.cfg @@ -1,6 +1,6 @@ [buildout] extends = - https://dist.plone.org/release/6.0.0/versions.cfg + https://dist.plone.org/release/6.0.9/versions.cfg base.cfg versions = versions @@ -12,3 +12,4 @@ zodb-temporary-storage = off black = 21.7b0 importlib-metadata = 4.12.0 Pygments = 2.14.0 +readme-renderer = 43.0 \ No newline at end of file diff --git a/requirements-6.0.x.txt b/requirements-6.0.x.txt index cb49b770..0ef1af7d 100644 --- a/requirements-6.0.x.txt +++ b/requirements-6.0.x.txt @@ -1,7 +1,7 @@ -# https://dist.plone.org/release/6.0.0/requirements.txt -pip==22.3.1 -setuptools==65.5.1 -wheel==0.38.4 +# https://dist.plone.org/release/6.0.9/requirements.txt +pip==23.3.1 +setuptools==69.0.2 +wheel==0.42.0 zc.buildout==3.0.1 # Windows specific down here (has to be installed here, fails in buildout) @@ -9,4 +9,4 @@ zc.buildout==3.0.1 pywin32 ; platform_system == 'Windows' # SSL Certs on windows, because Python is missing them otherwise: -certifi ; platform_system == 'Windows' \ No newline at end of file +certifi ; platform_system == 'Windows' diff --git a/src/collective/solr/utils.py b/src/collective/solr/utils.py index 2ea1c345..ed0c02e5 100644 --- a/src/collective/solr/utils.py +++ b/src/collective/solr/utils.py @@ -7,6 +7,7 @@ from six.moves import range from unidecode import unidecode from zope.component import getUtility +from zope.component import queryUtility if hasattr(str, "maketrans"): maketrans = str.maketrans @@ -22,7 +23,9 @@ def getConfig(): def isActive(): """indicate if the solr connection should/can be used""" try: - registry = getUtility(IRegistry) + registry = queryUtility(IRegistry) + if registry is None: + return False active = registry["collective.solr.active"] except KeyError: return False @@ -132,7 +135,7 @@ def isSimpleSearch(term): new_parts.append(parts[i]) else: new_parts.append("quoted") - term = u"".join(new_parts) + term = "".join(new_parts) if bool(operators.match(term)): return False if bool(simpleCharacters.match(term)):