-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2024-09-04T14:03:02-07:00 Author: David Glick (davisagli) <david@glicksoftware.com> Commit: plone/Products.CMFPlone@8a9eed5 Update help text for redirector target path (#4007) * Update help text for redirector target path * changelog Files changed: A news/4007.bugfix M Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt
- Loading branch information
Showing
1 changed file
with
12 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,20 @@ | ||
Repository: plone.app.discussion | ||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-09-02T17:38:21+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> | ||
Commit: https://github.com/plone/plone.app.discussion/commit/feb6196979e0801621a91dd1cc0bc471098c2026 | ||
Branch: refs/heads/master | ||
Date: 2024-09-04T14:03:02-07:00 | ||
Author: David Glick (davisagli) <david@glicksoftware.com> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/8a9eed5f44af6078b9fe2d94933a47968691406c | ||
|
||
When installing plone.app.discussion enable comments globally. | ||
Update help text for redirector target path (#4007) | ||
|
||
In 6.1 you have to explicitly install the add-on in the Add-ons control panel. | ||
If you do that, then you obviously want discussions to be enabled globally. | ||
I think this also helps for the Volto case, where a Discussion control panel is missing, so in Plone 6.0 you cannot even properly enable comments. | ||
* Update help text for redirector target path | ||
* changelog | ||
|
||
Files changed: | ||
M news/211.breaking | ||
M plone/app/discussion/interfaces.py | ||
M plone/app/discussion/testing.py | ||
M plone/app/discussion/tests/test_controlpanel.py | ||
A news/4007.bugfix | ||
M Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt | ||
|
||
b'diff --git a/news/211.breaking b/news/211.breaking\nindex f4cad3c5..62173580 100644\n--- a/news/211.breaking\n+++ b/news/211.breaking\n@@ -1,4 +1,5 @@\n Move this package in the space of Plone Core add-ons.\n It now depends on Products.CMFPlone and is no longer installed by default.\n It is still available in the default Plone distribution, but can be omitted in customizations.\n-[jensens]\n\\ No newline at end of file\n+Installing this in the Add-ons control panel will enable comments globally.\n+[jensens]\ndiff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py\nindex 5fca1385..eefa9c7d 100644\n--- a/plone/app/discussion/interfaces.py\n+++ b/plone/app/discussion/interfaces.py\n@@ -216,7 +216,7 @@ class IDiscussionSettings(Interface):\n "objects before users will be able to post comments.",\n ),\n required=False,\n- default=False,\n+ default=True,\n )\n \n anonymous_comments = schema.Bool(\ndiff --git a/plone/app/discussion/testing.py b/plone/app/discussion/testing.py\nindex 48a74392..18a396e3 100644\n--- a/plone/app/discussion/testing.py\n+++ b/plone/app/discussion/testing.py\n@@ -1,5 +1,4 @@\n from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE\n-from plone.app.discussion.interfaces import IDiscussionSettings\n from plone.app.robotframework.testing import REMOTE_LIBRARY_ROBOT_TESTING\n from plone.app.testing import applyProfile\n from plone.app.testing import FunctionalTesting\n@@ -8,9 +7,7 @@\n from plone.app.testing import setRoles\n from plone.app.testing import TEST_USER_ID\n from plone.app.testing import TEST_USER_PASSWORD\n-from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n-from zope.component import queryUtility\n \n \n try:\n@@ -105,12 +102,6 @@ class PloneAppDiscussionRobot(PloneAppDiscussion):\n REMOTE_LIBRARY_ROBOT_TESTING,\n )\n \n- def setUpPloneSite(self, portal):\n- applyProfile(portal, "plone.app.discussion:default")\n- registry = queryUtility(IRegistry)\n- settings = registry.forInterface(IDiscussionSettings)\n- settings.globally_enabled = True\n-\n \n PLONE_APP_DISCUSSION_ROBOT_FIXTURE = PloneAppDiscussionRobot()\n PLONE_APP_DISCUSSION_FIXTURE = PloneAppDiscussion()\ndiff --git a/plone/app/discussion/tests/test_controlpanel.py b/plone/app/discussion/tests/test_controlpanel.py\nindex 25bb6a14..e2271dbe 100644\n--- a/plone/app/discussion/tests/test_controlpanel.py\n+++ b/plone/app/discussion/tests/test_controlpanel.py\n@@ -49,7 +49,7 @@ def test_globally_enabled(self):\n "plone.app.discussion.interfaces."\n + "IDiscussionSettings.globally_enabled"\n ],\n- False,\n+ True,\n )\n \n def test_anonymous_comments(self):\n' | ||
|
||
Repository: plone.app.discussion | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-09-02T17:49:53+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> | ||
Commit: https://github.com/plone/plone.app.discussion/commit/5129fb914d13a300e62efd6c99d46b4b925ef470 | ||
|
||
Remove test code for ancient ATContentTypes Topics. | ||
|
||
This was only used in the `collection-integration-test.txt`, but this is actually currently not being tested. | ||
|
||
Files changed: | ||
M plone/app/discussion/testing.py | ||
M plone/app/discussion/tests/collection-integration-test.txt | ||
|
||
b'diff --git a/plone/app/discussion/testing.py b/plone/app/discussion/testing.py\nindex 18a396e3..83dafbb4 100644\n--- a/plone/app/discussion/testing.py\n+++ b/plone/app/discussion/testing.py\n@@ -10,14 +10,6 @@\n from Products.CMFCore.utils import getToolByName\n \n \n-try:\n- import plone.app.collection # noqa\n-\n- COLLECTION_TYPE = "Collection"\n-except ImportError:\n- COLLECTION_TYPE = "Topic"\n-\n-\n class PloneAppDiscussion(PloneSandboxLayer):\n defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)\n \ndiff --git a/plone/app/discussion/tests/collection-integration-test.txt b/plone/app/discussion/tests/collection-integration-test.txt\nindex c8814d43..b02c176b 100644\n--- a/plone/app/discussion/tests/collection-integration-test.txt\n+++ b/plone/app/discussion/tests/collection-integration-test.txt\n@@ -2,6 +2,8 @@ XXX: This functional test part has been removed due to the removal of\n ATContentTypes from PLONE_FIXTURE. We have to rewrite this test as a robot\n test because the dexterity collections do not work without js.\n \n+XXX To put this more plainly: this file is currently NOT tested.\n+\n \n List comments in a collection\n -----------------------------\n@@ -12,33 +14,24 @@ Create a collection.\n >>> from plone.app.testing import TEST_USER_NAME\n >>> setRoles(portal, \'manager\', [\'Manager\'])\n >>> browser.open(portal.absolute_url())\n- >>> from plone.app.discussion.testing import COLLECTION_TYPE\n- >>> browser.getLink(url=\'++add++\' + COLLECTION_TYPE).click()\n+ >>> browser.getLink(url=\'++add++Collection\').click()\n >>> open(\'/tmp/testbrowser.html\', \'w\').write(browser.contents)\n >>> browser.getControl(\'form.widgets.IDublinCore.title\').value = \'Foo Comment Collection\'\n >>> browser.getControl(\'Save\').click()\n >>> print(browser.contents)\n <...Changes saved...\n- >>> topic_url = browser.url\n+ >>> collection_url = browser.url\n \n Set the collection criteria.\n \n- >>> browser.open(topic_url + "/edit")\n+ >>> browser.open(collection_url + "/edit")\n \n- >>> if COLLECTION_TYPE == "Collection":\n- ... browser.getControl(name="addindex").value = [\'portal_type\']\n- ... browser.getControl(name="form.button.addcriteria").click()\n- ... browser.getControl(name="addoperator").value = [\'plone.app.querystring.operation.selection.any\']\n- ... browser.getControl(name="form.button.addcriteria").click()\n- ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]\n- ... browser.getControl(name="form.button.save").click()\n- ... else:\n- ... browser.getLink(\'Criteria\').click()\n- ... browser.getControl(\'Item Type\', index=0).selected = True\n- ... browser.getControl(\'Select content types\').selected = True\n- ... browser.getControl(\'Add criteria\').click()\n- ... browser.getControl(\'Comment\').selected = True\n- ... browser.getControl(\'Save\', index=0).click()\n+ >>> browser.getControl(name="addindex").value = [\'portal_type\']\n+ ... browser.getControl(name="form.button.addcriteria").click()\n+ ... browser.getControl(name="addoperator").value = [\'plone.app.querystring.operation.selection.any\']\n+ ... browser.getControl(name="form.button.addcriteria").click()\n+ ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]\n+ ... browser.getControl(name="form.button.save").click()\n >>> print(browser.contents)\n <...Changes saved...\n \n@@ -71,7 +64,7 @@ Delete the commented content.\n \n The comments are no longer in the catalog.\n \n- >>> browser.open(topic_url)\n+ >>> browser.open(collection_url)\n >>> browser.getLink(\'admin on Doc1\', index=0)\n Traceback (most recent call last):\n LinkNotFoundError\n' | ||
|
||
Repository: plone.app.discussion | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-09-04T21:44:39+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <maurits@py76.be> | ||
Commit: https://github.com/plone/plone.app.discussion/commit/e08c5d87efe4fbb740264dafac62a45ddf05007c | ||
|
||
Merge pull request #244 from plone/maurits-globally-enable-comments | ||
|
||
Globally enable comments on install | ||
|
||
Files changed: | ||
M news/211.breaking | ||
M plone/app/discussion/interfaces.py | ||
M plone/app/discussion/testing.py | ||
M plone/app/discussion/tests/collection-integration-test.txt | ||
M plone/app/discussion/tests/test_controlpanel.py | ||
|
||
b'diff --git a/news/211.breaking b/news/211.breaking\nindex f4cad3c5..62173580 100644\n--- a/news/211.breaking\n+++ b/news/211.breaking\n@@ -1,4 +1,5 @@\n Move this package in the space of Plone Core add-ons.\n It now depends on Products.CMFPlone and is no longer installed by default.\n It is still available in the default Plone distribution, but can be omitted in customizations.\n-[jensens]\n\\ No newline at end of file\n+Installing this in the Add-ons control panel will enable comments globally.\n+[jensens]\ndiff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py\nindex 5fca1385..eefa9c7d 100644\n--- a/plone/app/discussion/interfaces.py\n+++ b/plone/app/discussion/interfaces.py\n@@ -216,7 +216,7 @@ class IDiscussionSettings(Interface):\n "objects before users will be able to post comments.",\n ),\n required=False,\n- default=False,\n+ default=True,\n )\n \n anonymous_comments = schema.Bool(\ndiff --git a/plone/app/discussion/testing.py b/plone/app/discussion/testing.py\nindex 48a74392..83dafbb4 100644\n--- a/plone/app/discussion/testing.py\n+++ b/plone/app/discussion/testing.py\n@@ -1,5 +1,4 @@\n from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE\n-from plone.app.discussion.interfaces import IDiscussionSettings\n from plone.app.robotframework.testing import REMOTE_LIBRARY_ROBOT_TESTING\n from plone.app.testing import applyProfile\n from plone.app.testing import FunctionalTesting\n@@ -8,17 +7,7 @@\n from plone.app.testing import setRoles\n from plone.app.testing import TEST_USER_ID\n from plone.app.testing import TEST_USER_PASSWORD\n-from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n-from zope.component import queryUtility\n-\n-\n-try:\n- import plone.app.collection # noqa\n-\n- COLLECTION_TYPE = "Collection"\n-except ImportError:\n- COLLECTION_TYPE = "Topic"\n \n \n class PloneAppDiscussion(PloneSandboxLayer):\n@@ -105,12 +94,6 @@ class PloneAppDiscussionRobot(PloneAppDiscussion):\n REMOTE_LIBRARY_ROBOT_TESTING,\n )\n \n- def setUpPloneSite(self, portal):\n- applyProfile(portal, "plone.app.discussion:default")\n- registry = queryUtility(IRegistry)\n- settings = registry.forInterface(IDiscussionSettings)\n- settings.globally_enabled = True\n-\n \n PLONE_APP_DISCUSSION_ROBOT_FIXTURE = PloneAppDiscussionRobot()\n PLONE_APP_DISCUSSION_FIXTURE = PloneAppDiscussion()\ndiff --git a/plone/app/discussion/tests/collection-integration-test.txt b/plone/app/discussion/tests/collection-integration-test.txt\nindex c8814d43..b02c176b 100644\n--- a/plone/app/discussion/tests/collection-integration-test.txt\n+++ b/plone/app/discussion/tests/collection-integration-test.txt\n@@ -2,6 +2,8 @@ XXX: This functional test part has been removed due to the removal of\n ATContentTypes from PLONE_FIXTURE. We have to rewrite this test as a robot\n test because the dexterity collections do not work without js.\n \n+XXX To put this more plainly: this file is currently NOT tested.\n+\n \n List comments in a collection\n -----------------------------\n@@ -12,33 +14,24 @@ Create a collection.\n >>> from plone.app.testing import TEST_USER_NAME\n >>> setRoles(portal, \'manager\', [\'Manager\'])\n >>> browser.open(portal.absolute_url())\n- >>> from plone.app.discussion.testing import COLLECTION_TYPE\n- >>> browser.getLink(url=\'++add++\' + COLLECTION_TYPE).click()\n+ >>> browser.getLink(url=\'++add++Collection\').click()\n >>> open(\'/tmp/testbrowser.html\', \'w\').write(browser.contents)\n >>> browser.getControl(\'form.widgets.IDublinCore.title\').value = \'Foo Comment Collection\'\n >>> browser.getControl(\'Save\').click()\n >>> print(browser.contents)\n <...Changes saved...\n- >>> topic_url = browser.url\n+ >>> collection_url = browser.url\n \n Set the collection criteria.\n \n- >>> browser.open(topic_url + "/edit")\n+ >>> browser.open(collection_url + "/edit")\n \n- >>> if COLLECTION_TYPE == "Collection":\n- ... browser.getControl(name="addindex").value = [\'portal_type\']\n- ... browser.getControl(name="form.button.addcriteria").click()\n- ... browser.getControl(name="addoperator").value = [\'plone.app.querystring.operation.selection.any\']\n- ... browser.getControl(name="form.button.addcriteria").click()\n- ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]\n- ... browser.getControl(name="form.button.save").click()\n- ... else:\n- ... browser.getLink(\'Criteria\').click()\n- ... browser.getControl(\'Item Type\', index=0).selected = True\n- ... browser.getControl(\'Select content types\').selected = True\n- ... browser.getControl(\'Add criteria\').click()\n- ... browser.getControl(\'Comment\').selected = True\n- ... browser.getControl(\'Save\', index=0).click()\n+ >>> browser.getControl(name="addindex").value = [\'portal_type\']\n+ ... browser.getControl(name="form.button.addcriteria").click()\n+ ... browser.getControl(name="addoperator").value = [\'plone.app.querystring.operation.selection.any\']\n+ ... browser.getControl(name="form.button.addcriteria").click()\n+ ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]\n+ ... browser.getControl(name="form.button.save").click()\n >>> print(browser.contents)\n <...Changes saved...\n \n@@ -71,7 +64,7 @@ Delete the commented content.\n \n The comments are no longer in the catalog.\n \n- >>> browser.open(topic_url)\n+ >>> browser.open(collection_url)\n >>> browser.getLink(\'admin on Doc1\', index=0)\n Traceback (most recent call last):\n LinkNotFoundError\ndiff --git a/plone/app/discussion/tests/test_controlpanel.py b/plone/app/discussion/tests/test_controlpanel.py\nindex 25bb6a14..e2271dbe 100644\n--- a/plone/app/discussion/tests/test_controlpanel.py\n+++ b/plone/app/discussion/tests/test_controlpanel.py\n@@ -49,7 +49,7 @@ def test_globally_enabled(self):\n "plone.app.discussion.interfaces."\n + "IDiscussionSettings.globally_enabled"\n ],\n- False,\n+ True,\n )\n \n def test_anonymous_comments(self):\n' | ||
b'diff --git a/Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt b/Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt\nindex c2ab5a5ee3..dc1f3bc5b3 100644\n--- a/Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt\n+++ b/Products/CMFPlone/controlpanel/browser/redirects-controlpanel.pt\n@@ -124,7 +124,7 @@\n </div>\n \n <small class="formHelp form-text text-muted" i18n:translate="help_target_path">\n- Enter the absolute path of the target. The path must start with \'/\'.\n+ Enter the absolute path of the target.\n Target must exist or be an existing alternative url path to the target.\n </small>\n \ndiff --git a/news/4007.bugfix b/news/4007.bugfix\nnew file mode 100644\nindex 0000000000..8f81e077e7\n--- /dev/null\n+++ b/news/4007.bugfix\n@@ -0,0 +1 @@\n+Fix help text for redirect target path. @davisagli\n' | ||
|