[GeoNetwork-users] Upgrade 3.0.5 to 3.7 - file issue

Long-time no see

I have upgrade GN from 3.0.5 to 3.7 (supposed be 3.8) and have a problem
with file url.
for example it was:
http://server/geonetwork/srv/eng//resources.get?uuid=d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84&fname=Figure_4.6.jpg
but became:
http://server/geonetwork/srv/api/records/d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84/attachments/Figure_4.6.jpg?approved=true

there are a few changes that need to be fixed! "/eng//resources.get?uuid="
have to be "/api/records/" and "&fname=" have to be "/attachments/"

How can I change it for all my 650 datasets?

Hóddi

--
Hólmgrímur Helgason (Hóddi)
CAFF - Data Manager
hoddi@anonymised.com
+354 462 3357

Hi

There's a Java class defined for this MetadataResourceDatabaseMigrationTask
<https://github.com/geonetwork/core-geonetwork/blob/3.8.x/core/src/main/java/org/fao/geonet/MetadataResourceDatabaseMigration.java&gt;,
I would expect would be automatically executed when upgrading the database
in the startup process of 3.8, but maybe not.

You can execute it manually from the Swagger API page:

1) Login as Admistrator

2) Go to Swagger page (change SERVER with your server name), to the
migration API service

http://SERVER/geonetwork/doc/api/index.html#/tools/callStep

Click *Try it out *button and in *stepName* provide the value
*org.fao.geonet.MetadataResourceDatabaseMigration*

3) When finishes the metadata should be updated with the new link format.

If you have a dev instance I would suggest to try it first in the dev
instance.

Regards,
Jose García

On Thu, Sep 19, 2019 at 11:50 AM Hólmgrímur Helgason <hoddi@anonymised.com34...> wrote:

Long-time no see

I have upgrade GN from 3.0.5 to 3.7 (supposed be 3.8) and have a problem
with file url.
for example it was:

http://server/geonetwork/srv/eng//resources.get?uuid=d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84&fname=Figure_4.6.jpg
but became:

http://server/geonetwork/srv/api/records/d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84/attachments/Figure_4.6.jpg?approved=true

there are a few changes that need to be fixed! "/eng//resources.get?uuid="
have to be "/api/records/" and "&fname=" have to be "/attachments/"

How can I change it for all my 650 datasets?

Hóddi

--
Hólmgrímur Helgason (Hóddi)
CAFF - Data Manager
hoddi@anonymised.com
+354 462 3357

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville

Hi, did you started from a new database or migrating from an old one ?
Any error in the log file ?
What type of harvester ?

Cheers

Francois

Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <
ndeville@anonymised.com> a écrit :

Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hello Francois,

I migrate a old one (from geonetwork 3.0). I can see all my files, users, .... I also migrate the data directory.

Actually I just tried again and it works... I downloaded the last version yesterday, maybe some issues were fixed in the meantime (first download of geonetwork 3.8 was two weeks ago).

Very sorry for the false alarm, and thanks for the reply.

Nicolas

On 8/10/19 18:31, Francois Prunayre wrote:
Hi, did you started from a new database or migrating from an old one ?
Any error in the log file ?
What type of harvester ?

Cheers

Francois

Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <ndeville@...1741...<mailto:ndeville@…1741…>> a écrit :
Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net<mailto:GeoNetwork-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be

Good. That SQL update
https://github.com/geonetwork/core-geonetwork/pull/4077/files which was
missing may also be related but I'm not 100% sure (it would require your
log file output). Anyway this will go in the next 3.8.2.

Francois

Le mer. 9 oct. 2019 à 09:31, Nicolas De Ville de Goyet <
ndeville@anonymised.com> a écrit :

Hello Francois,

I migrate a old one (from geonetwork 3.0). I can see all my files, users,
.... I also migrate the data directory.

Actually I just tried again and it works... I downloaded the last version
yesterday, maybe some issues were fixed in the meantime (first download of
geonetwork 3.8 was two weeks ago).

Very sorry for the false alarm, and thanks for the reply.

Nicolas

On 8/10/19 18:31, Francois Prunayre wrote:

Hi, did you started from a new database or migrating from an old one ?
Any error in the log file ?
What type of harvester ?

Cheers

Francois

Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <
ndeville@anonymised.com> a écrit :

Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79www.bmdc.begeonetwork.bmdc.be

Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

      &lt;gmd:topicCategory&gt;

<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.

Anyone already encountered that problem or has an idea how to solve it?

Thanks a lot,

Nicolas

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be
geonetwork.bmdc.be

On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
ndeville@anonymised.com> wrote:

Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl

to solve the problem but we were unsuccessful so far.

You can check the file update-fixed-info.xsl [1] or the metadata schema to
check if there is something removing those elements. This XSLT
transformation is applied before saving the metadata in the database and
index.

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

--

*Vriendelijke groeten / Kind regards,Juan Luis Rodríguez.
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <
juanluisrp@anonymised.com> wrote:

On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
ndeville@anonymised.com> wrote:

Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl

to solve the problem but we were unsuccessful so far.

You can check the file update-fixed-info.xsl [1] or the metadata schema to
check if there is something removing those elements. This XSLT
transformation is applied before saving the metadata in the database and
index.

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

This template removes any empty gmd:topicCategory element [1] but this
doesn't seem to be your case.
<xsl:template
match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"
priority="10" />

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251

--

*Vriendelijke groeten / Kind regards,Juan Luis Rodríguez.
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

Hello Juan,

Thanks for your answer.

After many trial I think I finally found the problem.
It seems that when you try to edit a metadata file, the 'simple' view is created dynamically gathering information from several sources (I would guess the database and the data directory).

If you change the view to 'xml' too quickly, the geonetwork only has gathered a fraction of the information and part of it is loss (such as the topicCategory keywords).

Therefore the solution to avoid the loss of information is to work slowly...

Maybe in the future versions of geonetwork this problem could be addressed?! It's a bit dangerous as you can loose metadata information quite easily.

Best,

Nicolas

On 15/10/19 15:54, Juan Luis Rodríguez Ponce wrote:

On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <juanluisrp@...444...<mailto:juanluisrp@…444…>> wrote:

On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <ndeville@...1741...<mailto:ndeville@…1741…>> wrote:
Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.

You can check the file update-fixed-info.xsl [1] or the metadata schema to check if there is something removing those elements. This XSLT transformation is applied before saving the metadata in the database and index.

[1] https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

This template removes any empty gmd:topicCategory element [1] but this doesn't seem to be your case.
<xsl:template

match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"

priority="10" />

[1] https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251

--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.

[https://www.geocat.net/wp-content/uploads/2015/07/GeoCat_small1.png\]<http://www.geocat.net/&gt;
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664<tel:+31318416664>

Please consider the environment before printing this email.

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be

Hi Nicolas

I got similar stuff and suspected was also due to execute any action before
the complete loading of the metadata editor, but didn't confirmed. Thanks
for confirming it.

Please if you can open an issue in GitHub to track this would be greatly
appreciated. Probably a solution can be disable all actions until all the
information required in the editor is loaded, but as loading all this stuff
using Ajax requests from different pieces of code, not really sure how
feasible it is. In the long term probably the best would be also to
optimise / reduce the number of Ajax requests to retrieve the information
required for the metadata editor.

Regards,
Jose García

On Tue, Oct 15, 2019 at 5:51 PM Nicolas De Ville de Goyet <
ndeville@anonymised.com> wrote:

Hello Juan,

Thanks for your answer.

After many trial I think I finally found the problem.
It seems that when you try to edit a metadata file, the 'simple' view is
created dynamically gathering information from several sources (I would
guess the database and the data directory).

If you change the view to 'xml' too quickly, the geonetwork only has
gathered a fraction of the information and part of it is loss (such as the
topicCategory keywords).

Therefore the solution to avoid the loss of information is to work
slowly...

Maybe in the future versions of geonetwork this problem could be
addressed?! It's a bit dangerous as you can loose metadata information
quite easily.

Best,

Nicolas

On 15/10/19 15:54, Juan Luis Rodríguez Ponce wrote:

On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <
juanluisrp@anonymised.com<mailto:juanluisrp@anonymised.com>> wrote:

On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
ndeville@anonymised.com<mailto:ndeville@anonymised.com>> wrote:
Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file

/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.

You can check the file update-fixed-info.xsl [1] or the metadata schema to
check if there is something removing those elements. This XSLT
transformation is applied before saving the metadata in the database and
index.

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

This template removes any empty gmd:topicCategory element [1] but this
doesn't seem to be your case.
<xsl:template

match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"

priority="10" />

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251

--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.

[https://www.geocat.net/wp-content/uploads/2015/07/GeoCat_small1.png\]<
http://www.geocat.net/&gt;
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664<tel:+31318416664>

Please consider the environment before printing this email.

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*