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
    (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
    Peter Mathis
    @petschki
    @AlbertDavid94 Since I've never touched site.zcml manually the buildout config from volto/api maybe gives you a hint ... see the CORSPolicy defined in zcml-additional ... https://github.com/plone/volto/blob/master/api/base.cfg ... maybe worth a try
    AlbertDavid
    @AlbertDavid94
    thx, I'll look into it
    Ramiro Batista da Luz
    @ramiroluz
    Done. @petschki , @MrTango . Was trying to get ride of unnecessary changes in the 1.x branch. But didn't figured out how to do it, so I made some minor changes on the 1.x HEAD. collective/Products.windowZ#10
    Made a draft pull request.
    Plone Chat
    @plone-chat
    [Steve Piercy (stevepiercy), irc.freenode.net] my Google Fu is failing me. Can someone direct me to docs that describe the various default roles and groups in Plone, and what are their permissions?
    [Steve Piercy (stevepiercy), irc.freenode.net] nm, found it by searching community https://community.plone.org/t/grant-permissions/7517/2?u=stevepiercy
    Plone Chat
    @plone-chat
    [Trackball (trackball), irc.freenode.net] https://docs.plone.org/manage/deploying/production/restarts.html I can't get Plone to start with this guide. the user plone_daemon doesn't seem to have permission to do `sudo -u plone_daemon bin/plonectl start`. but plone starts just fine, if i do `bin/plonectl start` as root user
    NicolasGoeddel
    @NicolasGoeddel
    I am working with Skins layers in PLone 5.2 and found out that only a few file types can be accessed through the browser, e.g. ico, png and js. But I also need ttf and some other file extensions to be publicly available.
    NicolasGoeddel
    @NicolasGoeddel
    Or what's a modern way to make files like ttf, png, jpg, js and similar accessible from everywhere and without something like domain/++plone++my.package.name/ using the browser/static thing?
    Plone Chat
    @plone-chat
    [https://webchat.freenode.net (admin-test), irc.freenode.net] Hi, ich habe eine Webformualr in Plone erstellt und ein Datumsfeld angelegt.
    [https://webchat.freenode.net (admin-test), irc.freenode.net] Nun möchte ich beim Aufrufen, des Webformulars gleich der heutige Tag im Datumsfeld angezeigt wird. Wie kann ich dies im xml Editor hinterlegen?
    NicolasGoeddel
    @NicolasGoeddel
    How can I add other file types than png, ico, js, ... to a skin directory? I want to make ttf and woff files avaiable through skins but it does not work. See also: https://community.plone.org/t/skin-layer-and-valid-file-extensions/10865
    Mikel Larreategi
    @erral
    @NicolasGoeddel you can add '.dtml' as extension and they will show in the skins folder
    file.ttf -> file.ttf.dtml