Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer set portal_properties.site_properties.visible_ids on site creation #693

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions news/125.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
No longer set ``portal_properties.site_properties.visible_ids`` on site creation.
The ``portal_properties`` tools is deprecated, ``visible_ids`` was not set as real property, and usage of ``visible_ids`` was largely removed in Plone 5.0 already.
You already can no longer set ``visible ids`` in the Editing control panel, nor in the member preferences.
The only remaining use for ``visible_ids``, if set to true, was to show the page ids on the 'select default page' form.
[maurits]
1 change: 0 additions & 1 deletion plone/app/contenttypes/browser/templates/full_view_item.pt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
dummy python: plone_layout.mark_view(view);
portal_url portal_state/portal_url;
checkPermission nocall: context/portal_membership/checkPermission;
site_properties context/portal_properties/site_properties;
">

<div metal:use-macro="item_macro">
Expand Down
21 changes: 0 additions & 21 deletions plone/app/contenttypes/setuphandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from plone.base.utils import unrestricted_construct_instance
from plone.dexterity.fti import IDexterityFTI
from plone.dexterity.utils import createContent
from plone.i18n.normalizer.interfaces import IURLNormalizer
from plone.portlets.interfaces import ILocalPortletAssignmentManager
from plone.portlets.interfaces import IPortletManager
from plone.registry.interfaces import IRegistry
Expand Down Expand Up @@ -131,25 +130,6 @@ def _setup_calendar(portal, locale):
portal_calendar.firstweekday = first


def _setup_visible_ids(portal, target_language, locale):
portal_properties = getToolByName(portal, "portal_properties")
site_properties = portal_properties.site_properties

# See if we have a URL normalizer
normalizer = queryUtility(IURLNormalizer, name=target_language)
if normalizer is None:
normalizer = queryUtility(IURLNormalizer)

# If we get a script other than Latn we enable visible_ids
if locale.id.script is not None:
if locale.id.script.lower() != "latn":
site_properties.visible_ids = True

# If we have a normalizer it is safe to disable the visible ids
if normalizer is not None:
site_properties.visible_ids = False


def _setup_constrains(container, allowed_types):
behavior = ISelectableConstrainTypes(container)
behavior.setConstrainTypesMode(constrains.ENABLED)
Expand Down Expand Up @@ -361,7 +341,6 @@ def setup_various(context):
portal = getSite()
target_language, is_combined_language, locale = _get_locales_info(portal)
_setup_calendar(portal, locale)
_setup_visible_ids(portal, target_language, locale)

# install explicitly the plone.app.event
if HAS_EVENT:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def read(*rnames):
"plone.autoform",
"plone.event",
"plone.folder",
"plone.i18n",
"plone.indexer",
"plone.memoize",
"plone.portlets",
Expand Down