[GeoNetwork-devel] [GeoNetwork opensource Developer website] #955: deleting schema plugin - seems to remove all other templates.

#955: deleting schema plugin - seems to remove all other templates.
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version:
Keywords: |
-----------------------+----------------------------------------------------
Removing a schema after it has been installed seems to break the
templates.

Steps to reproduce from a fresh installation of geonetwork.

1 - Install plugin via web interface (administration -> Add a metadata
schema/profile) - in this case I used the one from the repository
schemaPlugins/trunk/iso19139.mcp

2 - add templates for new schema plugin that was uploaded.

3 - Also add templates for iso19139

4 - Going to Administration -> New metadata - shows list of the templates
- both from MCP and also from iso19139

5 - Remove plugin using web interface (administration -> Delete a metadata
schema/profile)

6 - Going to Administration -> New metadata - shows error "No templates
available, import metadata first." I was expecting to still see the
iso19139 templates?

7 - Adding a template for any of the remaining schema does not solve the
issue. (even though it said that they were added successfully and I can
see them in the database)

8 - re-installing the mcp pluging fixes the issue. All the templates were
working again.

Also noticed that removing a schema does not remove the templates that
were installed from the schema plugin.

Windows XP
Oracle 11G
Geonetwork 2012-06-12 nightly build 2.8 branch

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/955&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#955: deleting schema plugin - seems to remove all other templates.
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version:
Keywords: |
-----------------------+----------------------------------------------------

Comment(by ianwallen):

I also noticed that if I add content before I delete the schema then after
the schema is deleted, searching for the content give me "XPathException :
Template iso19139.mcpBrief has not been defined"

Maybe it should not allow the removal of a schema if there is data
associated?

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/955#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#955: deleting schema plugin - seems to remove all other templates.
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version:
Keywords: |
-----------------------+----------------------------------------------------

Comment(by simonp):

No templates are actually being deleted - the guiservice that generates
the list of templates to display actually calls an xslt to process the
results of a search for template records - this xslt fails because the
search returns template records that belong to the deleted schema and they
can't be processed.

However I think the guiservice could now use fast=index when it searches
for the template records and avoid this issue as this will provide all the
geonet:info fields it needs. I'll prepare a fix for this based on this
approach.

Can decide on whether to allow a schema to be deleted if records still
exist with that schema later (after 2.8.x maybe?).

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/955#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.