Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Ramon Bartl
@ramonski
@embuthia_twitter: The fix is already in the main code, but senaite.core isn't yet released. Probably we will release it within the next 2 weeks.
kimmu
@kimmu
Hi everyone, can I make a new content type using Dexterity in Senaite? I was just confused since someone from plone gitter chat advised me to go with Dexterity, emphasizing that Archetypes is dead and that it won't have Python 3 support. Thank you.
Ramon Bartl
@ramonski
Yes @kimmu, Dexterity is the way to go with new Content Types unless you need to extend one of the existing ones.
See here how to hook DX contents into the ID Machinery: senaite/senaite.core#1441
AlbertDavid
@AlbertDavid94
@ramonski I've installed the senaite api but any ajax requests towards the senaite API are being blocked by the CORS policy. Is there a configuration option to accept cross-domain traffic?
Ramon Bartl
@ramonski
Hi @AlbertDavid94, this is probably something you need to configure in NGINX: https://www.google.de/search?q=cors+nginx
AlbertDavid
@AlbertDavid94
@ramonski
I'm actuallz not working with nginx
Ramon Bartl
@ramonski
AlbertDavid
@AlbertDavid94
Yes, I am requesting that page with an AJaX call and it gives me the CORS error
Ramon Bartl
@ramonski
Try to use a GET request for retrieving the data and POST only to set/modify data.
AlbertDavid
@AlbertDavid94
    $.ajax({
        url: "http://10.170.76.23:8080/senaite/@@API/senaite/v1/analysisrequest",
        type: "GET",
    }).done(function(e) {
That is my javascript code
Ramon Bartl
@ramonski
yes, this should work. Better use the fetch API from standard JavaScript, e.g.:
let myHeaders = new Headers();
myHeaders.append('Content-Type', 'application/json');

const myInit = {
  method: 'GET',
  headers: myHeaders,
  mode: 'cors',
  cache: 'default',
  credentials: 'include'
};

let myRequest = new Request('http://10.170.76.23:8080/senaite/@@API/senaite/v1/analysisrequest');

fetch(myRequest, myInit).then(function(response) {
   return response.json()
});
AlbertDavid
@AlbertDavid94
Access to fetch at 'http://10.170.76.23:8080/senaite/@@API/senaite/v1/analysisrequest' from 
origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request 
doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the 
requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' 
to fetch the resource with CORS disabled.
Hmmm
Ramon Bartl
@ramonski
Then make it mode: 'no-cors'
Anyhow, try to stick to the standard JS documentation
AlbertDavid
@AlbertDavid94
I already did, it's giving me an error that I don't understand
It's only saying "Fetch failed loading" :\
Ramon Bartl
@ramonski
Ok, maybe this can be useful as well: https://enable-cors.org/
AlbertDavid
@AlbertDavid94
thx, I'll look into it
kimmu
@kimmu
@ramonski Thanks for the clarification.
kimmu
@kimmu

Hello, this may sound like a stupid question but uhhh, yeah, just desperate. So I tried adding a dexterity content type and I'm able to successfully add one (well not totally successful since I still have this edit action tab error). Whenever I'm adding a new type of this content, the default is active. Am still displaying all the review_states on the ListingView (Active, Inactive, and All). The problem is that my new items are only visible on the "All" state even though an item's state is "Active". Soo any insights as to why? What file should I modify in order to display my items on the "Active" state as well?

In terms of archetypes, I'm able to follow the steps and all is well when adding a content type. I'm just still not good with incorporating dexterity with senaite. Thank you.

kimmu
@kimmu
What's with the UNKNOWN error ive encountered that too
kimmu
@kimmu
We already have: UNKNOWN 0.0.0
but soupsieve 1.9.5 requires 'backports.functools_lru_cache; python_version < "3"
Ronald
@ronna
@DPKfsf_twitter Hi, I think I manged to fix that error. You have to add the following to your versions section:
cairocffi = 0.9.0
tinycss2 = 0.6.1
soupsieve = 1.9
backports.functools-lru-cache = 1.5
the cairocffi and tinycss2 version pinning might not be necessary
kimmu
@kimmu
Thank you very much @ronna !!!
Ramon Bartl
@ramonski
Thanks @ronna for pointing that out.
Could you add that as an additional fixture to: senaite/senaite.lims#106
kimmu
@kimmu
Screenshot from 2019-11-27 15-15-41.png
^ has anyone encountered this before?
I tried reinstalling senaite. Got the soupsieve error. Fixed that thanks to @ronna. Then I got this new one. Can't also install addon due to this. Lost with reinstallation. But I swear it all worked well the first intall
The suggested fix did not work for me as well
Ramon Bartl
@ramonski
@ronna: You need to re-run upgrade step 1.3.3 from the master branch or re-import the propertiestool.xml from portal_setup:
https://github.com/senaite/senaite.core/pull/1469/files#diff-3d345d34ac3181d6055135f949f7ee8cR47
Ronald
@ronna
Hi @ramonski how do I run upgrade step 1.3.3? Is it from the ZMI?
Ramon Bartl
@ramonski
  1. ZMI -> portal_setup -> Upgrades
  2. Select profile bika.lims:default
  3. Click "Show old upgrades"
  4. Select "Upgrade to SENAITE.CORE 1.3.3 (1.3.2 → 1.3.3)"
  5. Click Upgrade
Ronald
@ronna
image.png
@ramonski
Senaite Core version still remains at 1.3.2
Ramon Bartl
@ramonski
@ronna: did it fix the AttributeError: email_from_name ?
Ronald
@ronna
Morning @ramonski , unfortunately it did not solve the issue. Its not super urgent, I will keep investigating
AndriyPlakhotnyk
@AndriyPlakhotnyk
Hi, does anyone here run senaite on windows? If so how did you set it up?
pioneerpathan
@pioneerpathan

Hello All,

How to set date format "YYYY-MM-DD" for DateTimeWidget ? At some places, DateTimeWidget takes format respective to client's system date format. I want to make it according to server date format.

The specific issue, I am facing is in DateTimeWidget in DataGridWidget in "AnalysisRequest Imports" screen.

Billy Allen
@billyallen_gitlab
Hello, trying to implement senaite.jasonapi but keep getting the following error, {"_runtime": 0.0023660659790039062, "message": "No tool named 'portal_catalog' found.", "success": false}
Has anyone had any experience with this at all?
Pau Soliva
@Espurna
@AndriyPlakhotnyk You can follow the instruction from Plone: https://docs.plone.org/4/en/manage/installing/installation.html#installing-plone-on-windows Then, you can install Senaite configuiring the buildout properly
AlbertDavid
@AlbertDavid94
I've never set up a reverse proxy and I'm not sure where to start when I want to set it up with senaite.
I'd like to use nginx as a reverse proxy, but how to I use it with sen8?
Ramon Bartl
@ramonski