- 02 Mar, 2023 28 commits
-
-
Jérome Perrin authored
Update ZMI pages with the design of Products.ZMySQLDA and with the usage of manage_page_header, which sets the content-type to html
-
Jérome Perrin authored
-
Jérome Perrin authored
fixup! ERP5Catalog: Fix UnicodeDecodeError on non ascii catalog search when the inituser name is unicode variable was not zope_testSearchNonAsciiWithLegacyUserFolderUser
-
Jérome Perrin authored
Products.CMFCore.CachingPolicyManager.CPMCache became a new style class
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
because __str__() returns id in Zope2 but returns login in Zope4.
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
-
Jérome Perrin authored
XMLExportImport encode strings in base64 when they can not safely be represented in XML (including for exemple "\n"), so we can not use this information to decide if this a BINBYTES or a BINSTRING pickle opcode. For now, it's still unclear how bytes and str should be handled, so while using python2 it's better to keep using str everywhere and not introduce zodbpickle.binary that looks like str on python2 but will become bytes on python3 and have consistent data everywhere (ie. everything str) BINBYTES is not fully removed from the patch, because we'll want to use it later, but it is in "if" that is always false.
-
Jérome Perrin authored
This reverts commit c45c2295. to get test passing again
-
Jérome Perrin authored
On Zope4 these settings are no longer in zope.conf
-
Jérome Perrin authored
We now target transaction 3 so this patch is not longer compatible and no longer needed according to discussions on the launchpad issue. _sort_key is also set to '1' on recent Products.ZSQLMethods
-
Arnaud Fontaine authored
For now, remove it completely. If necessary `registerHelp()` can be used. commit f3ab4409bfa9a3e1943099c8ae391a2f0273b53b Date: Sat Jul 2 18:26:53 2011 +0000 Removed the old help system, in favor of the current Sphinx documentation hosted at http://docs.zope.org/zope2/. For backwards compatibility the `registerHelp` and `registerHelpTitle` methods are still available on the ProductContext used during the `initialize` function.
-
Jérome Perrin authored
Unlike StringIO.StringIO().tell() and open().tell(), which all return int, io.BytesIO().tell() returns long. Because io.BytesIO is used when uploading files on Zope4, this cause PropertySheetValidity errors when checking consistency, because Data.size property is expected to be int.
-
Jérome Perrin authored
Checks that created document types match constraints
-
Jérome Perrin authored
-
Jérome Perrin authored
Previously, we were using an encoded string, which in practice worked, but with python3, WSGI server will encode as latin1 (because WSGI is latin1) and already with Zope4 on python2 we have issues with testing, as functional testing fake WSGI server only accepts ascii headers [1] 1: https://github.com/zopefoundation/Zope/blob/cddecf7e/src/Testing/ZopeTestCase/functional.py#L125-L126
-
Jérome Perrin authored
Since Zope 4, the `standard_error_message` is rendered in the context of REQUEST['PUBLISHED'], which in case of publishing a skin (page template or script) in the context of a document is is the skin itself, but for error rendering in case of erp5_web Web Site or Web Section, we expect standard_error_message_template to always be rendered in the context of the document, that's why we use REQUEST.PARENTS[0] as context. REQUEST.PUBLISHED = <PythonScript at /erp5/script used for /erp5/module/document> REQUEST.PARENTS [<Document>, <Module>, <ERP5Site>, ...]
-
Jérome Perrin authored
-
Jérome Perrin authored
No longer needed on Zope4, from commit dc5b9292f (Merge pull request 387 from zopefoundation/re-379-revert-repr, 2018-10-26)
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Arnaud Fontaine authored
Not handled by waitress: https://github.com/Pylons/waitress/issues/198
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
- 01 Mar, 2023 12 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Call the original method instead of copy/pasting the code We still keep the following patches: - user: this is an ERP5 addition and maybe we use it in customer project code (if we don't I'm in favor of removing the feature, it's used in only one place in this repo) - call `self.changeSkin(self.portal.getCurrentSkinName())`. Maybe this is needed for CMFCore tests and could be good to send upstream, I did not check this part
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
`zope_quick_start` was a dtml that was removed in Zope commit c8e4cd5ca (Simplify control panel objects and actually make them non-persistent., 2016-08-14), but it is referenced in /index_html page template, which contains: <tal:text tal:replace="structure context/zope_quick_start" /> As a result, rendering / is an error page because of KeyError: 'zope_quick_start' In SlapOS setup, we are using / in an haproxy health check, so the health check fail and zope is marked as down and haproxy does not send requests to backend. We could have an upgrader constraint to repair this page template, but because of this, zope is unreachable through haproxy, so it's easier to ressort to monkey patching.
-
Tatuya Kamada authored
Zope4 inituser is decoded by decode('utf-8') on Zope startup and it is unicode on python2, therefore it raises UnicodeDecodeError when searching non ascii charater on catalog. Traceback (most recent call last): File "<portal_components/test.erp5.testERP5Catalog>", line 4144, in testSearchNonAsciiWithTheInitUser person_module.searchFolder(title=person_title)] File "./erp5/product/ERP5Type/Core/Folder.py", line 452, in searchFolder return self.portal_catalog.searchResults(**kw) File "./erp5/product/ERP5Catalog/CatalogTool.py", line 819, in searchResults return ZCatalog.searchResults(self, sql_catalog_id=catalog_id, **kw) File "./erp5/product/ZSQLCatalog/ZSQLCatalog.py", line 1070, in searchResults return catalog.searchResults(REQUEST, **kw) File "./erp5/product/ZSQLCatalog/SQLCatalog.py", line 2362, in searchResults **kw File "./erp5/product/ZSQLCatalog/SQLCatalog.py", line 2326, in queryResults **kw File "./erp5/product/ZSQLCatalog/SQLCatalog.py", line 2214, in buildSQLQuery only_group_columns, File "./erp5/product/ZSQLCatalog/SQLExpression.py", line 397, in asSQLExpressionDict 'where_expression': self.getWhereExpression(), File "./erp5/product/ZSQLCatalog/SQLExpression.py", line 298, in getWhereExpression result = self.sql_expression_list[0].getWhereExpression() File "./erp5/product/ZSQLCatalog/SQLExpression.py", line 303, in getWhereExpression result = '(%s)' % (operator.join(x.getWhereExpression() for x in self.sql_expression_list), ) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
-
Jérome Perrin authored
This is necessary on Zope4 because the error page is executed even if the response already has a locked body - and in this case we don't want to override the content-type header that might also have been set. One user of this is Base_redirect from erp5_hal_json_style, when abort_transaction is True, in that case it sets a body in json, a content type header of application/json and then raise a redirect so that the transaction is not commited. This fixes a problem visible on Zope4 with erp5_bank_reconciliation_renderjs_ui_test:testFunctionalRJSBankReconciliationAction
-
Jérome Perrin authored
Even if this is not used because we have locked a status earlier, the constructor expects an URL with zExceptions 4
-
Jérome Perrin authored
-