Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http and https deployment not picking up profiles (site broken) #18

Open
PhilReedData opened this issue Aug 8, 2024 · 2 comments
Open

Comments

@PhilReedData
Copy link

PhilReedData commented Aug 8, 2024

Related to issue #16, I cannot use this site at all on either http or https, the profile selection does not load. Tested on latest Chrome, Firefox, Edge, on macOS 14 and Windows 10. Also observed by several colleagues in ELIXIR for months.

When loading the http address:

  • The 'Select Profile' button does nothing. The list of profiles is empty. Edit: Incorrect, the profiles would load, I made a mistake in my observations, apologies.
  • ℹ️The console shows Initialise Bioschemas Generator then Website URL:... but initially no error messages.
  • After using the forms and generating markup...
  • 🛑The console shows error Access to XMLHttpRequest at 'http://rdf-translator.appspot.com/convert/json-ld/rdfa/content' from origin 'http://www.macs.hw.ac.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Failed to load resource: net::ERR_FAILED. Then similar error for http://rdf-translator.appspot.com/convert/json-ld/microdata/content.

When loading the https address with default security settings:

  • The 'Select Profile' button does nothing. The list of profiles is empty.
  • 🛑The console shows error Mixed Content: The page at... was loaded over HTTPS, but requested an insecure script '...jquery.min.js'. This request has been blocked; the content must be served over HTTPS.
  • 🛑The console shows subsequent errors because JQuery did not load.

When loading the https address with Chrome/Edge 'Site Settings' set to allow insecure content:

  • The 'Select Profile' button does nothing. The list of profiles is empty.
  • ⚠️The console shows warning Mixed Content: The page at... was loaded over HTTPS, but requested an insecure script '...jquery.min.js'. This content should also be served over HTTPS.
  • ℹ️The console shows Initialise Bioschemas Generator then Website URL:....
  • ⚠️The console shows warning Mixed Content: The page at... was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '.../BioschemasGenerator//profiles/'. This content should also be served over HTTPS.
  • 🛑The console shows error Access to XMLHttpRequest at '.../BioschemasGenerator//profiles/' from origin 'https://www.macs.hw.ac.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 🛑The console shows subsequent errors because the profiles did not load.

As already raised in issue #16, the script to load JQuery should be changed to load the https version, at least when the page is requested over https. In addition, something needs to be changed to address the CORS policy error. I don't know what CORS is, it might go away if the page loads everything over https.

@PhilReedData
Copy link
Author

PhilReedData commented Aug 8, 2024

To clarify, where I say "The 'Select Profile' button does nothing.", I mean that the drop-down list of 'Bioschemas Profile' is empty. I realise now that the 'Select Profile' button just opens that block up to before 'Profile Form', so it is not meant to do anything when clicked if the first block is already open. The important thing is that the drop-down list is empty, so we cannot use the website.

I've checked out the web app code to my personal server, changed the jquery link from http to https (in index.html line 5). It fixed the problem of the empty dropdown list of Bioschemas Profiles, as far as I can see. https://duckwhistle.com/bmg/BioschemasGenerator/

I didn't try to install the scripting tool to my web server, I don't have Python etc. So the web app brought up an outdated (default) set of profile versions but then at least the website was (mostly) working. It would generate JSON-LD but not RDFa or Microdata, the latter two being blocked again since they call http URLs. See issue #19.

@PhilReedData
Copy link
Author

I have now been able to get the profiles to load on the http site after all, apologies for the confusion. My observations may still help diagnose the problems in correcting the https version.

Should the link on the Bioschemas website menu be updated to http? (Can it be?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant