dataverse-docker icon indicating copy to clipboard operation
dataverse-docker copied to clipboard

Problems loading custom metadata using init.d script

Open vera opened this issue 3 years ago • 3 comments

I have tried to load custom metadata as described in https://github.com/IQSS/dataverse-docker#custom-metadata-support however the custom metadata blocks are not showing up in the UI.

E.g. I have uncommented the line CESSDA=True in .env and run docker-compose up but it does not appear in the UI.

To debug, I have edited init.d/1002-custom-metadata.sh to write the output of curl http://localhost:8080/api/admin/datasetfield/load ... to a file. This is the output:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Payara Server  5.2021.1 #badassfish - Error report</title>
		<style type="text/css">
			<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}-->
		</style>
	</head>
	<body>
		<h1>HTTP Status 404 - Not Found</h1>
		<hr/>
		<p><b>type</b> Status report</p>
		<p><b>message</b>Not Found</p>
		<p><b>description</b>The requested resource is not available.</p>
		<hr/>
		<h3>Payara Server  5.2021.1 #badassfish</h3>
	</body>
</html>

Am I missing something? Thanks.

vera avatar Nov 17 '22 15:11 vera

HI @vera, you should do it from inside of running Dataverse docker container. Outside curl requests to change metadata schema aren't allowed.

4tikhonov avatar Nov 19 '22 11:11 4tikhonov

Shouldn't the init script run it in the correct container automatically? To be clear, I didn't manually run the curl request, I just ran docker-compose up

vera avatar Nov 21 '22 08:11 vera

Yes, if it will copied in init.d folder, please check the repo.

4tikhonov avatar Nov 21 '22 08:11 4tikhonov