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

add seo behavior to file #286

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
6.2.23 (unreleased)
-------------------

- Nothing changed yet.
- add SEO behavior to File
[mamico]


6.2.22 (2024-10-30)
Expand Down
1 change: 0 additions & 1 deletion base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,5 @@ eggs = createcoverage
[versions]
# Don't use a released version of design.plone.contenttypes
design.plone.contenttypes =
plone.restapi =

[sources]
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# use this extend one of the buildout configuration:
extends =
test_plone60.cfg
test-6.0.x.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<version>7308</version>
<version>7309</version>
<dependencies>
<dependency>profile-redturtle.bandi:default</dependency>
<dependency>profile-collective.venue:default</dependency>
Expand Down
10 changes: 10 additions & 0 deletions src/design/plone/contenttypes/profiles/default/types/File.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
meta_type="Dexterity FTI"
name="File"
i18n:domain="plone"
>
<property name="behaviors" purge="False">
<element value="kitconcept.seo" />
</property>
</object>
7 changes: 7 additions & 0 deletions src/design/plone/contenttypes/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -912,4 +912,11 @@
destination="7308"
handler=".to_730x.to_7308"
/>
<genericsetup:upgradeStep
title="add kitconcept.seo to File"
profile="design.plone.contenttypes:default"
source="7308"
destination="7309"
handler=".to_730x.to_7309"
/>
</configure>
13 changes: 13 additions & 0 deletions src/design/plone/contenttypes/upgrades/to_730x.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,16 @@ def to_7308(context):
if i % 15 == 0:
logger.info("Progress: {}/{}".format(i, tot))
brain.getObject().reindexObject(idxs=["effectivestart"])


def to_7309(context):
logger.info("Enable kitconcept.seo behavior to File")
portal_types = api.portal.get_tool(name="portal_types")
behavior = "kitconcept.seo"
for ct in ["File"]:
portal_type = portal_types.get(ct, None)
if portal_type:
behaviors = list(portal_type.behaviors)
if behavior not in behaviors:
behaviors.append(behavior)
portal_type.behaviors = tuple(behaviors)
10 changes: 0 additions & 10 deletions test-5.2.x-py27.cfg

This file was deleted.

15 changes: 0 additions & 15 deletions test-5.2.x.cfg

This file was deleted.

6 changes: 1 addition & 5 deletions test-6.0.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
extends =
https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
https://raw.githubusercontent.com/RedTurtle/iocomune-backend/main/versions.cfg
base.cfg

[versions]
zc.buildout = >=3.0.0rc3
pip = 22.2.2
setuptools = 65.3.0
collective.z3cform.datagridfield = >=3.0.0
collective.contentrules.mailfromfield = >=1.1.0
77 changes: 0 additions & 77 deletions test_plone60.cfg

This file was deleted.

Loading