1. 22 Apr, 2020 3 commits
    • Jérome Perrin's avatar
      ERP5Type: Don't log when cache factory is not found · 5a3c16e4
      Jérome Perrin authored
      This should prevent all the warnings like
      
          WARNING Cache.__call__ Factory erp5_content_medium not found, method <function getTypeList at 0x7fd8b2ce4cd0> executed without cache
          WARNING Cache.__call__ Factory erp5_content_long not found, method <function _getPortalGroupedTypeSet at 0x7fd8bc613750> executed without cache
      
      we have during startup.
      
      This code tried to detect the case where cache system was not
      fully initialized an only log in this case, but there does not seem to
      be a reliable way to detect that cache is supposed to be ready and that
      log was not really useful - If some methods are executed without cache
      for some reason (which as far as I know never happens), then we should
      be able to notice the problem because it's slow.
      5a3c16e4
    • Jérome Perrin's avatar
      Base.getModificationDate: prevent KeyError time when indexing · f5d883c0
      Jérome Perrin authored
      This happens a lot with components, that we export without the time in
      workflow history.
      f5d883c0
    • Jérome Perrin's avatar
      BusinessTemplate: prevent a wrong "Cleaning corrupted BTreeFolder2" log · 5bec2ec8
      Jérome Perrin authored
      This log happens a lot, for example for property sheets, but there's
      nothing corrupted, it's just that we export the objects with their empty
      _mt_index
      5bec2ec8
  2. 21 Apr, 2020 10 commits
  3. 20 Apr, 2020 1 commit
  4. 17 Apr, 2020 4 commits
  5. 16 Apr, 2020 8 commits
    • Georgios Dagkakis's avatar
      erp5_document_scanner: add Manager proxy role to script · c5f05bf6
      Georgios Dagkakis authored
      for Base_getDocumentScannerDefaultBackendDataAsJSON
      since we need to be able to create Active Process
      c5f05bf6
    • Arnaud Fontaine's avatar
      ZODB Components: providesIFoo() getters were only created for FS Interfaces (MR !1099). · c86107bf
      Arnaud Fontaine authored
      Add them to BaseAccessorHolder (like `Base Category` accessors) instead of
      Base class so they can be regenerated on reset while not having to remove
      ZODB Components from Base class on reset.
      
      This means that providesIFoo() will only be available on Portal Type classes
      whereas before it was working for direct Document instanciation, but the latter
      has been banned for several years anyway and the few remaining ones have been
      fixed (23b2b5fd, e791d08a).
      
      Also, instead of Base.provides() being a CachingMethod() (does not work with
      resets), create a method dynamically on the Portal Type class (erp5.portal_type.Foo),
      as not caching at all is ~18 times slower.
      c86107bf
    • Arnaud Fontaine's avatar
      18f47f4e
    • Arnaud Fontaine's avatar
      TypesTool.getInterfaceTypeList(): Filesystem Interfaces were not returned. · 34fc009d
      Arnaud Fontaine authored
      And thus filesystem Interfaces were not displayed/selectable in BaseType_view.
      34fc009d
    • Arnaud Fontaine's avatar
      erp5_certificate_authority: Certificate Authority Tool: All ERP5 objects... · 23b2b5fd
      Arnaud Fontaine authored
      erp5_certificate_authority: Certificate Authority Tool: All ERP5 objects *must* have have a Portal Type in Types Tool.
      
      And remove hack in erp5_promise which was creating a non-Portal Type class of
      portal_certificate_authority. Instead, add a depend on erp5_certificate_authority.
      `providesI*` accessors are now in BaseAccessorHolder rather than Base due to ZODB
      Components, this breaks reindexing (`AttributeError: providesIPredicate`).
      
      This gets rid of:
        WARNING ERP5Type.dynamic Cannot find a portal type definition for 'Certificate Authority Tool', trying to guess...
      23b2b5fd
    • Arnaud Fontaine's avatar
      Portal Type as Classes: ERP5Form: Instances of Documents should never be created directly. · e791d08a
      Arnaud Fontaine authored
      This has been banned since the introduction of Portal Type class. When creating
      a new ERP5Form via addERP5Form/ZMI, its MRO:
        * Before:
          <class 'Products.ERP5Form.Form.ERP5Form'>
          <class 'Products.ERP5Type.Base.Base'>
          ...
          <type 'ExtensionClass.Base'>
        * Now:
          <class 'erp5.portal_type.ERP5 Form'>,
          <class 'Products.ERP5Form.Form.ERP5Form'>,
          <class 'Products.ERP5Type.Base.Base'>,
          ...
          <class 'erp5.accessor_holder.property_sheet.SimpleItem'>
          <class 'erp5.accessor_holder.property_sheet.Folder'>
          <class 'erp5.accessor_holder.property_sheet.Base'>
          <class 'erp5.accessor_holder.property_sheet.CategoryCore'>
          <class 'erp5.accessor_holder.BaseAccessorHolder'>
          <class 'Products.ERP5Type.dynamic.portal_type_class.GetAcquireLocalRolesMixIn'>
          <type 'ExtensionClass.Base'>
      
      Thus it was missing many accessors and was working only by chance (or at least
      unless these accessors were not called until the object was automatically migrated
      by the next call to __setstate__). Namely, as `providesI*` accessors are now in
      BaseAccessorHolder rather than Base due to ZODB Components, this breaks reindexing
      (`AttributeError: providesIPredicate`).
      
      Also, remove hardcoded _getAcquireLocalRoles() now that it is not used as a regular
      class anymore. Set this on the portal type object instead.
      e791d08a
    • Arnaud Fontaine's avatar
      erp5_core: Move `ERP5 Form` Portal Type from erp5_hal_json_style as it is used by erp5_core. · 74d022e5
      Arnaud Fontaine authored
      This gets rid of:
        WARNING ERP5Type.dynamic Cannot find a portal type definition for 'ERP5 Form', trying to guess...
      74d022e5
    • Jérome Perrin's avatar
      bff8777e
  6. 15 Apr, 2020 1 commit
  7. 14 Apr, 2020 13 commits