Skip to content

Commit

Permalink
[fc] Repository: Products.CMFFormController
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2020-09-28T14:49:08+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFFormController@72b57cf

Tests: set request method to POST in a way that works on Plone 6 as well.

Files changed:
A news/3057.bugfix
M Products/CMFFormController/tests/testRedirectTo.py
Repository: Products.CMFFormController

Branch: refs/heads/master
Date: 2020-09-28T18:06:16+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/Products.CMFFormController@a3b0b67

Merge pull request #26 from plone/maurits/folder_publish

Tests: set request method to POST in a way that works on Plone 6 too

Files changed:
A news/3057.bugfix
M Products/CMFFormController/tests/testRedirectTo.py
  • Loading branch information
jensens committed Sep 28, 2020
1 parent 319f762 commit b71333c
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
Repository: plone.dexterity
Repository: Products.CMFFormController


Branch: refs/heads/master
Date: 2020-09-16T14:28:30+02:00
Date: 2020-09-28T14:49:08+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/plone.dexterity/commit/bba2b7a6ffafc002d97bf93b8b11b841b2697df5
Commit: https://github.com/plone/Products.CMFFormController/commit/72b57cf3daf8724d29e9d7a085c44cdd7ad04bc3

Removed call of listing macro in content-core view for containers.

It was broken.
We now show the same as for items: only the fields.
Fixes https://github.com/plone/Products.CMFPlone/issues/3177.

Looks like in core only `plone.app.versioningbehavior` calls this view.
Tests: set request method to POST in a way that works on Plone 6 as well.

Files changed:
A news/3177.bugfix
M plone/dexterity/browser/configure.zcml
M plone/dexterity/browser/containercontentcore.pt
A news/3057.bugfix
M Products/CMFFormController/tests/testRedirectTo.py

b'diff --git a/news/3177.bugfix b/news/3177.bugfix\nnew file mode 100644\nindex 0000000..23c090e\n--- /dev/null\n+++ b/news/3177.bugfix\n@@ -0,0 +1,4 @@\n+Removed call of listing macro in ``content-core`` view for containers.\n+It was broken. We now show the same as for items: only the fields.\n+Fixes `issue 3177 <https://github.com/plone/Products.CMFPlone/issues/3177>`_.\n+[maurits]\ndiff --git a/plone/dexterity/browser/configure.zcml b/plone/dexterity/browser/configure.zcml\nindex 393dcbd..b33c275 100644\n--- a/plone/dexterity/browser/configure.zcml\n+++ b/plone/dexterity/browser/configure.zcml\n@@ -13,7 +13,10 @@\n />\n \n <!-- Content core views -->\n-\n+ <!-- Note: the templaces are the same since the changes for\n+ https://github.com/plone/Products.CMFPlone/issues/3177\n+ That may be okay: makes it easier to customize\n+ only the template for items or for containers. -->\n <browser:page\n for="..interfaces.IDexterityItem"\n name="content-core"\ndiff --git a/plone/dexterity/browser/containercontentcore.pt b/plone/dexterity/browser/containercontentcore.pt\nindex f95d8e8..2e07bdf 100644\n--- a/plone/dexterity/browser/containercontentcore.pt\n+++ b/plone/dexterity/browser/containercontentcore.pt\n@@ -18,11 +18,4 @@\n </div>\n </fieldset>\n \n- <fieldset id="folder-listing">\n- <legend>Contents</legend>\n- <tal:block define="listing_macro context/folder_listing/macros/listing">\n- <metal:use_macro use-macro="listing_macro" />\n- </tal:block>\n- </fieldset>\n-\n </metal:content-core>\n'
b'diff --git a/Products/CMFFormController/tests/testRedirectTo.py b/Products/CMFFormController/tests/testRedirectTo.py\nindex 4424014..35a9628 100644\n--- a/Products/CMFFormController/tests/testRedirectTo.py\n+++ b/Products/CMFFormController/tests/testRedirectTo.py\n@@ -7,8 +7,8 @@\n from plone.app.testing import TEST_USER_ID\n from plone.app.testing import TEST_USER_NAME\n from plone.app.testing import TEST_USER_PASSWORD\n+from plone.testing.zope import Browser\n from plone.protect import createToken\n-from plone.testing.z2 import Browser\n \n import transaction\n import unittest\n@@ -98,6 +98,7 @@ def test_attacker_redirect(self):\n \n # The same without the testbrowser\n self.assertIsNone(self.request.response.headers.get(\'location\'))\n+ self.request.environ["REQUEST_METHOD"] = "POST"\n self.request.REQUEST_METHOD = \'POST\'\n self.request.form[\'workflow_action\'] = \'publish\'\n self.request.form[\'paths\'] = path\ndiff --git a/news/3057.bugfix b/news/3057.bugfix\nnew file mode 100644\nindex 0000000..3f3971f\n--- /dev/null\n+++ b/news/3057.bugfix\n@@ -0,0 +1,2 @@\n+Tests: set request method to POST in a way that works on Plone 6 as well.\n+[maurits]\n'

Repository: plone.dexterity
Repository: Products.CMFFormController


Branch: refs/heads/master
Date: 2020-09-25T19:33:42+02:00
Date: 2020-09-28T18:06:16+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.dexterity/commit/312c19dea992430afba27fcd763dfdfe36e06c03
Commit: https://github.com/plone/Products.CMFFormController/commit/a3b0b67bd323225177887d244afef3ce7b7aba0d

Merge pull request #132 from plone/maurits/content-core-issue-3177
Merge pull request #26 from plone/maurits/folder_publish

Removed call of listing macro in content-core view for containers.
Tests: set request method to POST in a way that works on Plone 6 too

Files changed:
A news/3177.bugfix
M plone/dexterity/browser/configure.zcml
M plone/dexterity/browser/containercontentcore.pt
A news/3057.bugfix
M Products/CMFFormController/tests/testRedirectTo.py

b'diff --git a/news/3177.bugfix b/news/3177.bugfix\nnew file mode 100644\nindex 0000000..23c090e\n--- /dev/null\n+++ b/news/3177.bugfix\n@@ -0,0 +1,4 @@\n+Removed call of listing macro in ``content-core`` view for containers.\n+It was broken. We now show the same as for items: only the fields.\n+Fixes `issue 3177 <https://github.com/plone/Products.CMFPlone/issues/3177>`_.\n+[maurits]\ndiff --git a/plone/dexterity/browser/configure.zcml b/plone/dexterity/browser/configure.zcml\nindex 393dcbd..b33c275 100644\n--- a/plone/dexterity/browser/configure.zcml\n+++ b/plone/dexterity/browser/configure.zcml\n@@ -13,7 +13,10 @@\n />\n \n <!-- Content core views -->\n-\n+ <!-- Note: the templaces are the same since the changes for\n+ https://github.com/plone/Products.CMFPlone/issues/3177\n+ That may be okay: makes it easier to customize\n+ only the template for items or for containers. -->\n <browser:page\n for="..interfaces.IDexterityItem"\n name="content-core"\ndiff --git a/plone/dexterity/browser/containercontentcore.pt b/plone/dexterity/browser/containercontentcore.pt\nindex f95d8e8..2e07bdf 100644\n--- a/plone/dexterity/browser/containercontentcore.pt\n+++ b/plone/dexterity/browser/containercontentcore.pt\n@@ -18,11 +18,4 @@\n </div>\n </fieldset>\n \n- <fieldset id="folder-listing">\n- <legend>Contents</legend>\n- <tal:block define="listing_macro context/folder_listing/macros/listing">\n- <metal:use_macro use-macro="listing_macro" />\n- </tal:block>\n- </fieldset>\n-\n </metal:content-core>\n'
b'diff --git a/Products/CMFFormController/tests/testRedirectTo.py b/Products/CMFFormController/tests/testRedirectTo.py\nindex 4424014..35a9628 100644\n--- a/Products/CMFFormController/tests/testRedirectTo.py\n+++ b/Products/CMFFormController/tests/testRedirectTo.py\n@@ -7,8 +7,8 @@\n from plone.app.testing import TEST_USER_ID\n from plone.app.testing import TEST_USER_NAME\n from plone.app.testing import TEST_USER_PASSWORD\n+from plone.testing.zope import Browser\n from plone.protect import createToken\n-from plone.testing.z2 import Browser\n \n import transaction\n import unittest\n@@ -98,6 +98,7 @@ def test_attacker_redirect(self):\n \n # The same without the testbrowser\n self.assertIsNone(self.request.response.headers.get(\'location\'))\n+ self.request.environ["REQUEST_METHOD"] = "POST"\n self.request.REQUEST_METHOD = \'POST\'\n self.request.form[\'workflow_action\'] = \'publish\'\n self.request.form[\'paths\'] = path\ndiff --git a/news/3057.bugfix b/news/3057.bugfix\nnew file mode 100644\nindex 0000000..3f3971f\n--- /dev/null\n+++ b/news/3057.bugfix\n@@ -0,0 +1,2 @@\n+Tests: set request method to POST in a way that works on Plone 6 as well.\n+[maurits]\n'

0 comments on commit b71333c

Please sign in to comment.