diff --git a/last_commit.txt b/last_commit.txt index 9d922ef34e..d7ec2ca30d 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,160 +1,568 @@ -Repository: plone.app.contenttypes +Repository: Products.Archetypes Branch: refs/heads/master -Date: 2018-03-27T10:35:45-03:00 -Author: hvelarde (hvelarde) -Commit: https://github.com/plone/plone.app.contenttypes/commit/c8c3a360217fb992981fa3e869a37d8fc3866e38 +Date: 2017-12-20T10:29:16-05:00 +Author: David Glick (davisagli) +Commit: https://github.com/plone/Products.Archetypes/commit/e4750ee9d2fdaa338bceeacfbe08a6d64a80dbc4 -Add test case for issue #457 +We want to edit the raw text Files changed: -M plone/app/contenttypes/tests/test_link.py - -diff --git a/plone/app/contenttypes/tests/test_link.py b/plone/app/contenttypes/tests/test_link.py -index 7fb0f911..4cf569fb 100644 ---- a/plone/app/contenttypes/tests/test_link.py -+++ b/plone/app/contenttypes/tests/test_link.py -@@ -160,6 +160,21 @@ def test_link_redirect_view_path_with_variable(self): - self.assertTrue(view()) - self._assert_redirect('http://nohost/plone/my-folder/my-item') - -+ def test_link_redirect_view_path_with_variable_and_parameters(self): -+ # https://github.com/plone/plone.app.contenttypes/issues/457 -+ self.link.remoteUrl = '${portal_url}/@@search?SearchableText=Plone' -+ self._publish(self.link) -+ view = self._get_link_redirect_view(self.link) -+ -+ # As manager: do not redirect -+ self.assertTrue(view()) -+ self.assertEqual(self.response.status, 200) -+ -+ # As anonymous: redirect -+ logout() -+ self.assertTrue(view()) -+ self._assert_redirect('http://nohost/plone/@@search?SearchableText=Plone') -+ - def test_mailto_type(self): - self.link.remoteUrl = 'mailto:stress@test.us' - view = self._get_link_redirect_view(self.link) +M CHANGES.rst +M Products/Archetypes/Widget.py +M Products/Archetypes/tests/test_pawidgets.py + +diff --git a/CHANGES.rst b/CHANGES.rst +index 95a959cb..5c5b343a 100644 +--- a/CHANGES.rst ++++ b/CHANGES.rst +@@ -14,7 +14,8 @@ New features: + + Bug fixes: + +-- *add item here* ++- Use the edit accessor to get text for TinyMCEWidget. ++ [davisagli] + + + 1.14.3 (2017-11-24) +diff --git a/Products/Archetypes/Widget.py b/Products/Archetypes/Widget.py +index 116d1db2..c63cc863 100644 +--- a/Products/Archetypes/Widget.py ++++ b/Products/Archetypes/Widget.py +@@ -1399,7 +1399,7 @@ def _base_args(self, context, field, request): + args = super(TinyMCEWidget, self)._base_args(context, field, request) + args['name'] = field.getName() + args['value'] = (request.get(field.getName(), +- field.getAccessor(context)()) ++ field.getEditAccessor(context)()) + ).decode('utf-8') + + args.setdefault('pattern_options', {}) +diff --git a/Products/Archetypes/tests/test_pawidgets.py b/Products/Archetypes/tests/test_pawidgets.py +index 717af32d..f5cabb77 100644 +--- a/Products/Archetypes/tests/test_pawidgets.py ++++ b/Products/Archetypes/tests/test_pawidgets.py +@@ -581,7 +581,7 @@ def setUp(self): + self.portal = self.layer['portal'] + self.request = TestRequest(environ={'HTTP_ACCEPT_LANGUAGE': 'en'}) + self.field = Mock() +- self.field.getAccessor.return_value = lambda: 'fieldvalue' ++ self.field.getEditAccessor.return_value = lambda: 'fieldvalue' + self.field.getName.return_value = 'fieldname' + self.field.getContentType.return_value = 'text/html' + -Repository: plone.app.contenttypes +Repository: Products.Archetypes Branch: refs/heads/master -Date: 2018-03-27T10:37:06-03:00 -Author: hvelarde (hvelarde) -Commit: https://github.com/plone/plone.app.contenttypes/commit/78b04be1c273c3ec5d5f605dcc5085ad85f53b18 +Date: 2018-02-01T17:31:41+01:00 +Author: Jens W. Klein (jensens) +Commit: https://github.com/plone/Products.Archetypes/commit/e25765a67cb061ddf48698d18884e10ed1738152 -Do not encode query strings on internal link redirections +Merge branch 'master' into fix-tinymce-widget-accessor Files changed: +M .travis.yml M CHANGES.rst -M plone/app/contenttypes/browser/link_redirect_view.py +M Products/Archetypes/Extensions/migrations.py +M Products/Archetypes/Extensions/utils.py +M Products/Archetypes/configure.zcml +M Products/Archetypes/tests/test_pawidgets.py +M buildout.cfg +M setup.py +diff --git a/.travis.yml b/.travis.yml +index dc42630b..d75865d3 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -8,7 +8,8 @@ cache: + before_install: + - mkdir -p $HOME/buildout-cache/{eggs,downloads} + - virtualenv . +- - bin/python bootstrap.py --setuptools-version=33.1.1 --buildout-version=2.8.0 #from https://github.com/plone/buildout.coredev/blob/5.1/requirements.txt 2017-05-30 11:57 ++# Keep in sync with buildout.cfg: ++ - bin/python bootstrap.py --setuptools-version=38.2.4 --buildout-version=2.11.0 + install: + - bin/buildout -Nvt 5 -c travis.cfg + script: diff --git a/CHANGES.rst b/CHANGES.rst -index 6106f1fd..ac308697 100644 +index 5c5b343a..c005d68c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst -@@ -16,6 +16,10 @@ New features: +@@ -10,13 +10,18 @@ Breaking changes: + + New features: + +-- *add item here* ++- Removed CMFQuickInstaller dependency. ++ This was only used in ancient migration code. ++ [maurits] Bug fixes: -+- Do not encode query strings on internal link redirections; -+ fixes `issue 457 `_. -+ [hvelarde] + - Use the edit accessor to get text for TinyMCEWidget. + [davisagli] + ++- Fix test failures from https://github.com/plone/plone.app.widgets/pull/177 ++ [thet] ++ + + 1.14.3 (2017-11-24) + ------------------- +diff --git a/Products/Archetypes/Extensions/migrations.py b/Products/Archetypes/Extensions/migrations.py +index 942dba13..66d39a7b 100644 +--- a/Products/Archetypes/Extensions/migrations.py ++++ b/Products/Archetypes/Extensions/migrations.py +@@ -31,16 +31,19 @@ def write(self, s): + def reinstallArchetypes(portal, out): + """let's quickinstaller (re)install Archetypes and it's dependencies + """ +- qi = getToolByName(portal, 'portal_quickinstaller') ++ # Import here so it does not break when you manage to ++ # get a too old CMFPlone with a too new Archetypes. ++ from Products.CMFPlone.utils import get_installer ++ qi = get_installer(portal) + products = ('MimetypesRegistry', 'PortalTransforms', 'Archetypes', ) + print >>out, 'Reinstalling Archetypes and it\'s dependencies' + for product in products: +- if qi.isProductInstalled(product): +- qi.reinstallProducts([product]) +- print >>out, '... reinstalling %s' % product +- else: +- qi.installProducts([product]) +- print >>out, '... installing %s' % product ++ full_product = 'Products.{0}'.format(product) ++ if qi.is_product_installed(full_product): ++ qi.uninstall_product(full_product) ++ print >>out, '... uninstalling %s' % full_product ++ qi.install_product(full_product) ++ print >>out, '... installing %s' % full_product + print >>out, 'Done\n' + + +diff --git a/Products/Archetypes/Extensions/utils.py b/Products/Archetypes/Extensions/utils.py +index c969f324..007f89df 100644 +--- a/Products/Archetypes/Extensions/utils.py ++++ b/Products/Archetypes/Extensions/utils.py +@@ -306,19 +306,22 @@ def setupEnvironment(self, out, types, + install_deps=1): + + if install_deps: +- qi = getToolByName(self, 'portal_quickinstaller', None) + if require_dependencies: +- if not qi.isProductInstalled('CMFFormController'): +- qi.installProduct('CMFFormController', locked=1) ++ # Import here so it does not break when you manage to ++ # get a too old CMFPlone with a too new Archetypes. ++ from Products.CMFPlone.utils import get_installer ++ qi = get_installer(self) ++ if not qi.is_product_installed('Products.CMFFormController'): ++ qi.install_product('Products.CMFFormController', locked=1) + print >>out, 'Installing CMFFormController' +- if not qi.isProductInstalled('MimetypesRegistry'): +- qi.installProduct('MimetypesRegistry') ++ if not qi.is_product_installed('Products.MimetypesRegistry'): ++ qi.install_product('Products.MimetypesRegistry') + print >>out, 'Installing MimetypesRegistry' +- if not qi.isProductInstalled('PortalTransforms'): +- qi.installProduct('PortalTransforms') ++ if not qi.is_product_installed('Products.PortalTransforms'): ++ qi.install_product('Products.PortalTransforms') + print >>out, 'Installing PortalTransforms' +- if not qi.isProductInstalled('Archetypes'): +- qi.installProduct('Archetypes') ++ if not qi.is_product_installed('Archetypes'): ++ qi.install_product('Products.Archetypes') + print >>out, 'Installing Archetypes' + + if product_skins_dir: +diff --git a/Products/Archetypes/configure.zcml b/Products/Archetypes/configure.zcml +index 2be78b9d..4efd0742 100644 +--- a/Products/Archetypes/configure.zcml ++++ b/Products/Archetypes/configure.zcml +@@ -13,7 +13,6 @@ + + + +- + + + +diff --git a/Products/Archetypes/tests/test_pawidgets.py b/Products/Archetypes/tests/test_pawidgets.py +index f5cabb77..44338997 100644 +--- a/Products/Archetypes/tests/test_pawidgets.py ++++ b/Products/Archetypes/tests/test_pawidgets.py +@@ -331,6 +331,19 @@ def setUp(self): + xmlconfig.file('configure.zcml', plone.uuid, + context=self.layer['configurationContext']) + ++ def assertDictContainsSubset(self, dict_a, dict_b): ++ """Since ``assertDictContainsSubset`` is deprecated in Python 3.2 we ++ provide a substitution here. ++ From: https://stackoverflow.com/a/21213251/1337474 ++ """ ++ def extractDictAFromB(A, B): ++ return dict([(k, B[k]) for k in A.keys() if k in B.keys()]) ++ self.assertEqual(dict_a, extractDictAFromB(dict_a, dict_b)) + - - Migrations: - - Handle ignore catalog errors where a brain can't find it's object. - - Try to delete the layout attribute before setting the layout. -diff --git a/plone/app/contenttypes/browser/link_redirect_view.py b/plone/app/contenttypes/browser/link_redirect_view.py -index 20abc2f1..b9c385f3 100644 ---- a/plone/app/contenttypes/browser/link_redirect_view.py -+++ b/plone/app/contenttypes/browser/link_redirect_view.py -@@ -87,7 +87,7 @@ def absolute_target_url(self): - url - ]) - else: -- if not (url.startswith('http://') or url.startswith('https://')): -- url = self.request.physicalPathToURL(url) -+ if not url.startswith(('http://', 'https://')): -+ url = self.request['SERVER_URL'] + url ++ @mock.patch( ++ 'plone.app.widgets.utils.getToolByName', ++ new=Mock(return_value=Mock(return_value='testuser')) ++ ) + def test_multi_valued(self): + from zope.event import notify + from zope.interface import implementer +@@ -353,28 +366,37 @@ class ExampleContent(object): + self.field.multiValued = True - return url + widget = RelatedItemsWidget() ++ base_args = widget._base_args(self.context, self.field, self.request) + +- self.assertEqual( ++ self.assertDictContainsSubset( + { + 'name': 'fieldname', + 'value': '{};{}'.format(IUUID(obj1), IUUID(obj2)), + 'pattern': 'relateditems', +- 'pattern_options': { +- 'separator': ';', +- 'orderable': True, +- 'maximumSelectionSize': -1, +- 'vocabularyUrl': '/@@getVocabulary?name=' +- 'plone.app.vocabularies.Catalog' +- '&field=fieldname', +- 'basePath': '/Plone/doc', +- 'contextPath': '/Plone/doc', +- 'rootPath': '/', +- 'rootUrl': '' +- }, + }, +- widget._base_args(self.context, self.field, self.request), ++ base_args ++ ) ++ ++ self.assertDictContainsSubset( ++ { ++ 'separator': ';', ++ 'orderable': True, ++ 'maximumSelectionSize': -1, ++ 'vocabularyUrl': '/@@getVocabulary?name=' ++ 'plone.app.vocabularies.Catalog' ++ '&field=fieldname', ++ 'basePath': '/Plone/doc', ++ 'contextPath': '/Plone/doc', ++ 'rootPath': '/', ++ 'rootUrl': '' ++ }, ++ base_args.get('pattern_options', {}) + ) + ++ @mock.patch( ++ 'plone.app.widgets.utils.getToolByName', ++ new=Mock(return_value=Mock(return_value='testuser')) ++ ) + def test_single_value(self): + from zope.event import notify + from zope.interface import implementer +@@ -395,26 +417,35 @@ class ExampleContent(object): + self.field.multiValued = False + + widget = RelatedItemsWidget() ++ base_args = widget._base_args(self.context, self.field, self.request) + +- self.assertEqual( ++ self.assertDictContainsSubset( + { + 'name': 'fieldname', + 'value': '{}'.format(IUUID(obj1)), + 'pattern': 'relateditems', +- 'pattern_options': { +- 'separator': ';', +- 'orderable': True, +- 'maximumSelectionSize': 1, +- 'vocabularyUrl': '/@@getVocabulary?name=plone.app.vocabularies.Catalog&field=fieldname', # noqa +- 'basePath': '/Plone/doc', +- 'contextPath': '/Plone/doc', +- 'rootPath': '/', +- 'rootUrl': '' +- }, + }, +- widget._base_args(self.context, self.field, self.request), ++ base_args + ) + ++ self.assertDictContainsSubset( ++ { ++ 'separator': ';', ++ 'orderable': True, ++ 'maximumSelectionSize': 1, ++ 'vocabularyUrl': '/@@getVocabulary?name=plone.app.vocabularies.Catalog&field=fieldname', # noqa ++ 'basePath': '/Plone/doc', ++ 'contextPath': '/Plone/doc', ++ 'rootPath': '/', ++ 'rootUrl': '' ++ }, ++ base_args.get('pattern_options', {}) ++ ) ++ ++ @mock.patch( ++ 'plone.app.widgets.utils.getToolByName', ++ new=Mock(return_value=Mock(return_value='testuser')) ++ ) + def test_single_valued_empty(self): + from Products.Archetypes.Widget import RelatedItemsWidget + +@@ -423,28 +454,37 @@ def test_single_valued_empty(self): + self.field.multiValued = False + + widget = RelatedItemsWidget() ++ base_args = widget._base_args(self.context, self.field, self.request) + +- self.assertEqual( ++ self.assertDictContainsSubset( + { + 'name': 'fieldname', + 'value': '', + 'pattern': 'relateditems', +- 'pattern_options': { +- 'separator': ';', +- 'orderable': True, +- 'maximumSelectionSize': 1, +- 'vocabularyUrl': '/@@getVocabulary?name=' +- 'plone.app.vocabularies.Catalog' +- '&field=fieldname', +- 'basePath': '/Plone/doc', +- 'contextPath': '/Plone/doc', +- 'rootPath': '/', +- 'rootUrl': '', +- }, + }, +- widget._base_args(self.context, self.field, self.request), ++ base_args ++ ) ++ ++ self.assertDictContainsSubset( ++ { ++ 'separator': ';', ++ 'orderable': True, ++ 'maximumSelectionSize': 1, ++ 'vocabularyUrl': '/@@getVocabulary?name=' ++ 'plone.app.vocabularies.Catalog' ++ '&field=fieldname', ++ 'basePath': '/Plone/doc', ++ 'contextPath': '/Plone/doc', ++ 'rootPath': '/', ++ 'rootUrl': '', ++ }, ++ base_args.get('pattern_options', {}) + ) + ++ @mock.patch( ++ 'plone.app.widgets.utils.getToolByName', ++ new=Mock(return_value=Mock(return_value='testuser')) ++ ) + def test_multiple_widgets(self): + from zope.event import notify + from Products.Archetypes.Widget import RelatedItemsWidget +@@ -471,26 +511,30 @@ class ExampleContent(object): + widget=RelatedItemsWidget(), + ) + field1.accessor = "fieldvalue" ++ base_args1 = field1.widget._base_args(self.context, field1, self.request) # noqa + +- self.assertEqual( ++ self.assertDictContainsSubset( + { + 'name': 'fieldname1', + 'value': '{}'.format(IUUID(obj1)), + 'pattern': 'relateditems', +- 'pattern_options': { +- 'separator': ';', +- 'orderable': True, +- 'maximumSelectionSize': 1, +- 'vocabularyUrl': '/@@getVocabulary?name=' +- 'plone.app.vocabularies.Catalog' +- '&field=fieldname1', +- 'basePath': '/Plone/doc', +- 'contextPath': '/Plone/doc', +- 'rootPath': '/', +- 'rootUrl': '', +- }, + }, +- field1.widget._base_args(self.context, field1, self.request), ++ base_args1 ++ ) ++ self.assertDictContainsSubset( ++ { ++ 'separator': ';', ++ 'orderable': True, ++ 'maximumSelectionSize': 1, ++ 'vocabularyUrl': '/@@getVocabulary?name=' ++ 'plone.app.vocabularies.Catalog' ++ '&field=fieldname1', ++ 'basePath': '/Plone/doc', ++ 'contextPath': '/Plone/doc', ++ 'rootPath': '/', ++ 'rootUrl': '', ++ }, ++ base_args1.get('pattern_options', {}) + ) + + field2 = ReferenceField( +@@ -501,26 +545,31 @@ class ExampleContent(object): + ) + field2.accessor = "fieldvalue" + self.context.fieldvalue = lambda: [obj1, obj2] ++ base_args2 = field2.widget._base_args(self.context, field2, self.request) # noqa + +- self.assertEqual( ++ self.assertDictContainsSubset( + { + 'name': 'fieldname2', + 'value': '{};{}'.format(IUUID(obj1), IUUID(obj2)), + 'pattern': 'relateditems', +- 'pattern_options': { +- 'separator': ';', +- 'orderable': True, +- 'maximumSelectionSize': -1, +- 'vocabularyUrl': '/@@getVocabulary?name=' +- 'plone.app.vocabularies.Catalog' +- '&field=fieldname2', +- 'basePath': '/Plone/doc', +- 'contextPath': '/Plone/doc', +- 'rootPath': '/', +- 'rootUrl': '', +- }, + }, +- field2.widget._base_args(self.context, field2, self.request), ++ base_args2 ++ ) ++ ++ self.assertDictContainsSubset( ++ { ++ 'separator': ';', ++ 'orderable': True, ++ 'maximumSelectionSize': -1, ++ 'vocabularyUrl': '/@@getVocabulary?name=' ++ 'plone.app.vocabularies.Catalog' ++ '&field=fieldname2', ++ 'basePath': '/Plone/doc', ++ 'contextPath': '/Plone/doc', ++ 'rootPath': '/', ++ 'rootUrl': '', ++ }, ++ base_args2.get('pattern_options', {}) + ) + + +diff --git a/buildout.cfg b/buildout.cfg +index 79fbe418..dd287623 100644 +--- a/buildout.cfg ++++ b/buildout.cfg +@@ -1,16 +1,14 @@ + [buildout] ++index = https://pypi.python.org/simple/ + develop = . + parts = test + extends = http://dist.plone.org/release/5.1-latest/versions.cfg +- https://raw.githubusercontent.com/plone/buildout.coredev/5.1/sources.cfg +- +-# 2017-05-30 plone.app.widgets 2.1.1 does not suffice +-# TODO get rid of auto-checkout when new release has happened +-extensions = mr.developer +-auto-checkout = plone.app.widgets + + [versions] +-Products.Archetypes = ++Products.Archetypes = ++# Keep in sync with .travis.yml: ++setuptools = 38.2.4 ++zc.buildout = 2.11.0 + + [test] + recipe = zc.recipe.testrunner +diff --git a/setup.py b/setup.py +index 55d61311..e7ee9287 100644 +--- a/setup.py ++++ b/setup.py +@@ -13,6 +13,7 @@ + "Framework :: Plone", + "Framework :: Plone :: 5.1", + "Framework :: Zope2", ++ "License :: OSI Approved :: GNU General Public License (GPL)", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + ], +@@ -53,7 +54,6 @@ + 'zope.viewlet', + 'Products.CMFCore', + 'Products.CMFFormController', +- 'Products.CMFQuickInstallerTool', + 'Products.DCWorkflow', + 'Products.GenericSetup>=1.8.3', + 'Products.MimetypesRegistry>=2.0.3', -Repository: plone.app.contenttypes +Repository: Products.Archetypes Branch: refs/heads/master -Date: 2018-03-27T23:20:24+02:00 -Author: Alessandro Pisa (ale-rt) -Commit: https://github.com/plone/plone.app.contenttypes/commit/1b14503bbfe2f09c0574f0489a265f97cfc53d75 +Date: 2018-03-28T00:16:46-04:00 +Author: David Glick (davisagli) +Commit: https://github.com/plone/Products.Archetypes/commit/0b66e7295c4efe3af2cb15dba550bd7be052f7f9 -Merge pull request #458 from plone/issue_457 +Merge pull request #101 from plone/fix-tinymce-widget-accessor -Do not encode query strings on internal link redirections +We want to edit the raw text Files changed: M CHANGES.rst -M plone/app/contenttypes/browser/link_redirect_view.py -M plone/app/contenttypes/tests/test_link.py +M Products/Archetypes/Widget.py +M Products/Archetypes/tests/test_pawidgets.py diff --git a/CHANGES.rst b/CHANGES.rst -index 6106f1fd..ac308697 100644 +index 85ac228d..e9aebbc4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst -@@ -16,6 +16,10 @@ New features: +@@ -28,6 +28,9 @@ New features: Bug fixes: -+- Do not encode query strings on internal link redirections; -+ fixes `issue 457 `_. -+ [hvelarde] ++- Use the edit accessor to get text for TinyMCEWidget. ++ [davisagli] + - - Migrations: - - Handle ignore catalog errors where a brain can't find it's object. - - Try to delete the layout attribute before setting the layout. -diff --git a/plone/app/contenttypes/browser/link_redirect_view.py b/plone/app/contenttypes/browser/link_redirect_view.py -index 20abc2f1..b9c385f3 100644 ---- a/plone/app/contenttypes/browser/link_redirect_view.py -+++ b/plone/app/contenttypes/browser/link_redirect_view.py -@@ -87,7 +87,7 @@ def absolute_target_url(self): - url - ]) - else: -- if not (url.startswith('http://') or url.startswith('https://')): -- url = self.request.physicalPathToURL(url) -+ if not url.startswith(('http://', 'https://')): -+ url = self.request['SERVER_URL'] + url - - return url -diff --git a/plone/app/contenttypes/tests/test_link.py b/plone/app/contenttypes/tests/test_link.py -index 7fb0f911..4cf569fb 100644 ---- a/plone/app/contenttypes/tests/test_link.py -+++ b/plone/app/contenttypes/tests/test_link.py -@@ -160,6 +160,21 @@ def test_link_redirect_view_path_with_variable(self): - self.assertTrue(view()) - self._assert_redirect('http://nohost/plone/my-folder/my-item') - -+ def test_link_redirect_view_path_with_variable_and_parameters(self): -+ # https://github.com/plone/plone.app.contenttypes/issues/457 -+ self.link.remoteUrl = '${portal_url}/@@search?SearchableText=Plone' -+ self._publish(self.link) -+ view = self._get_link_redirect_view(self.link) -+ -+ # As manager: do not redirect -+ self.assertTrue(view()) -+ self.assertEqual(self.response.status, 200) -+ -+ # As anonymous: redirect -+ logout() -+ self.assertTrue(view()) -+ self._assert_redirect('http://nohost/plone/@@search?SearchableText=Plone') -+ - def test_mailto_type(self): - self.link.remoteUrl = 'mailto:stress@test.us' - view = self._get_link_redirect_view(self.link) + - Fix test failures from https://github.com/plone/plone.app.widgets/pull/177 + [thet] + +diff --git a/Products/Archetypes/Widget.py b/Products/Archetypes/Widget.py +index 116d1db2..c63cc863 100644 +--- a/Products/Archetypes/Widget.py ++++ b/Products/Archetypes/Widget.py +@@ -1399,7 +1399,7 @@ def _base_args(self, context, field, request): + args = super(TinyMCEWidget, self)._base_args(context, field, request) + args['name'] = field.getName() + args['value'] = (request.get(field.getName(), +- field.getAccessor(context)()) ++ field.getEditAccessor(context)()) + ).decode('utf-8') + + args.setdefault('pattern_options', {}) +diff --git a/Products/Archetypes/tests/test_pawidgets.py b/Products/Archetypes/tests/test_pawidgets.py +index b166dff6..44338997 100644 +--- a/Products/Archetypes/tests/test_pawidgets.py ++++ b/Products/Archetypes/tests/test_pawidgets.py +@@ -630,7 +630,7 @@ def setUp(self): + self.portal = self.layer['portal'] + self.request = TestRequest(environ={'HTTP_ACCEPT_LANGUAGE': 'en'}) + self.field = Mock() +- self.field.getAccessor.return_value = lambda: 'fieldvalue' ++ self.field.getEditAccessor.return_value = lambda: 'fieldvalue' + self.field.getName.return_value = 'fieldname' + self.field.getContentType.return_value = 'text/html' +