Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ramiro Batista da Luz
    @ramiroluz
    @MrTango did a review, merged and created the 1.5.1 release.
    My suspicion is that the release was created based on the master branch.
    Because the branch 1.x doesn't have the piece of code that is raising the exception.
    Ramiro Batista da Luz
    @ramiroluz
    My mistake, it hve.
    have
    Peter Mathis
    @petschki
    @ramiroluz well ... all good. the compare url is the same ... and the release was made from 1.x branch as you see in the commits https://github.com/collective/Products.windowZ/commits/1.x ... I think (reading your traceback again) the problem is the missing plone.api dependency which is not a part of core in 4.3 ... this has to be placed in WindowZ/setup.py
    Ramiro Batista da Luz
    @ramiroluz
    Humm, good. I will give it a try.
    Plone Chat
    @plone-chat
    [Adium-Benutzer (zmijunkie), irc.freenode.net] HI … das anybody know if pas.plugins.ldap uses a prefix like seen in https://github.com/laravel/laravel/blob/v5.4.23/config/cache.php#L89 to avoid key collisions ?
    Ramiro Batista da Luz
    @ramiroluz
    @petschki, @MrTango found a problem. Plone4 was supposed to be droped? Because we are trying to use the 1.x branch to use the latest working version in Plone4.
    What happens is that in a default profile some dependencies where added.
    Better, they don't work in Plone 4.3.19
    Ramiro Batista da Luz
    @ramiroluz
    :point_up: The 1.5.2.dev0 with this modifications are working, all tests passing in a plain plone 4.3.19 instalation.
    (all windowz tests at least)
    Ramiro Batista da Luz
    @ramiroluz
    $ ~/Plone/zinstance/src/Products.windowZ $ git branch 
    * 1.x
      master
    Our newest Plone Foundation members are Fulvio Casali, Stefania Trabucchi, Thomas Buchberger, and Andrea Cecchi https://plone.org/news/2019/four-members-join-the-plone-foundation-2019
    Peter Mathis
    @petschki
    @ramiroluz 1.x branch should stay compatible with Plone 4.3.x I think ... I'd create a PR with your changes!
    Maik Derstappen
    @MrTango

    @NicolasGoeddel like this:
    ```from AccessControl.SecurityManagement import newSecurityManager´

    newSecurityManager(context, context.getOwner())```

    AlbertDavid
    @AlbertDavid94
    Hi, I'm using Senaite which is built with plone. It offers an API that I try to access with AJAX which results in an error because of cross-origin-resource-sharing. How do I get around that?
    Maik Derstappen
    @MrTango
    @AlbertDavid94 check https://plonerestapi.readthedocs.io/en/latest/tusupload.html#cors-configuration
    you have to configure the backend to allow the access from your front-end domain if it is not the same domain.
    AlbertDavid
    @AlbertDavid94
    thanks! That is exactly what I'm looking for (I think)
    Maik Derstappen
    @MrTango
    but also check your headers, could be that you have to add more headers than stated in the docs, was the case when i used it last times. probably becaus i was using a fetch call instead of XMLHttpRequest
    NicolasGoeddel
    @NicolasGoeddel
    @MrTango Did you really just answer a questions from weeks ago? :-D
    AlbertDavid
    @AlbertDavid94
    I used these options in a jquery ajax call, didn't würk
        url: "http://10.170.76.21:8080/senaite/@@API/senaite/v1/search?portal_type=Client",
        type: 'GET',
            dataType: 'jsonp',
    Maik Derstappen
    @MrTango
    @NicolasGoeddel hihi, indeed, Gitter makes it possible :)
    @NicolasGoeddel btw for your usecase you don't need the view, you could just allow contributor for anonymous in theat folder and use the normal add link from the add menu. We do that for the talk submission on plonetagung.de too.
    @AlbertDavid94 you can check the headers in the browser inspector and compair this with your CORS config.
    Maik Derstappen
    @MrTango
    @ramiroluz it seems that there where already some Plone 5 releated commits before the split into 1.x branch. It should be safe to revert or change them in the 1.x branch. Some of the changes might be solvable by adding missing dependencies which are not installed in Plone 4 by default.
    Ramiro Batista da Luz
    @ramiroluz
    @MrTango right, adding plone.api as a dependency solved one problem. The other looks like something related to the depecretion of Archetypes in plone 5, I don't know. But it seens not needed in plone 4.
    @petschki thanks, I will do that. The workflow for PR's I intend to follow from now on is: discuss a little, create an issue, a working branch for the issue, a WIP pull request with small commits, then a final pull request.
    AlbertDavid
    @AlbertDavid94
    @MrTango how do I check the headers in the browser inspector?
    Maik Derstappen
    @MrTango
    depends on your browser, but usually the inspector opens with F12 and there you can see all requests. When you click on them you can see also headers.
    AlbertDavid
    @AlbertDavid94
    I'm in the chromium inspector. I'm logging the XMLHttpRequests but it doesn't show any headers...
    I'm in the console tab though
    ah right, I found it under "network"
    Maik Derstappen
    @MrTango
    it has to have showing the request activated, not sure whats the default, but normaly you should see every request your app does there
    AlbertDavid
    @AlbertDavid94

    So I found the file where I have to edit the entries

    When adding this plone:CORSPolicy, I get an error:
    ConfigurationError: ('Unknown directive', u'http://namespaces.plone.org/plone', u'CORSPolicy')

    wat do

    Maik Derstappen
    @MrTango
    @AlbertDavid94 add this to the first tag of the zcml file: xmlns:plone="http://namespaces.plone.org/plone"
    AlbertDavid
    @AlbertDavid94
    @MrTango I already did. That's the thing that is causing this error :\

    zope.configuration.xmlconfig.ZopeSAXParseException: File "/usr/local/Plone/zeocluster/parts/client1/etc/site.zcml", line 10.0, unbound prefix

    It gives this error when I try to restart senaite

    line 10 is
    <plone:CORSPolicy
    Peter Mathis
    @petschki
    @AlbertDavid94 you have to add the line <include package="plone.rest" file="meta.zcml" /> before this plone:CORSPolicy line
    there's the definition of this prefix
    note: seems enought to include package="plone.rest" only because the meta.zcml is included there already ...
    AlbertDavid
    @AlbertDavid94
    so just to be clear
    <configure
        xmlns="http://namespaces.zope.org/zope"
        xmlns:meta="http://namespaces.zope.org/meta"
        xmlns:five="http://namespaces.zope.org/five"
        xmlns:plone="http://namespaces.plone.org/plone">
    
      <include package="Products.Five" />
      <meta:redefinePermission from="zope2.Public" to="zope.Public" />
      <include package="plone.rest" file="meta.zcml" />
      <plone:CORSPolicy
          allow_origin="*"
          allow_credentials="true"
          expose_headers="Content-Length,X-My-Header"
          allow_headers="Accept,Authorization,Content-Type,X-Custom-Header"
          max_age="3600"/>
    
      <!-- Load the meta -->
      <include files="package-includes/*-meta.zcml" />
      <five:loadProducts file="meta.zcml"/>
    
      <!-- Load the configuration -->
      <include files="package-includes/*-configure.zcml" />
      <five:loadProducts />
    
      <!-- Load the configuration overrides-->
      <includeOverrides files="package-includes/*-overrides.zcml" />
      <five:loadProductsOverrides />
    
    
      <securityPolicy
          component="AccessControl.security.SecurityPolicy" />
    
    </configure>
    that's supposed to be my site.zcml?
    AlbertDavid
    @AlbertDavid94
    it doesn't würk very well