Error Using Import Link of Metadata Sharing on Platform 1.11.5

I am running metadata sharing module v1.2 with metadata mapping 1.0.2 on Platform 1.11.5. Unfortunately when I click “Import Metadata” link on the administration page under “Metadata Sharing” section I get this error:

Does your metadatasharing_imported_package have the subscriptionUrl column?

Nope it doesn’t. I saw a ‘url’ column in metadatasharing_subscription table though. Also I just created a ticket:

So the question is, what happened to the subscription_url column in this table? Did you just turn off running changesets? Does your liquibasechangelog table have a changeset with id metadatasharing_create_table_imported_package?

No I didn’t turn off running changesets and I just installed the module afresh why would it have some columns and miss some? I have also checked the changeset is there (see below)

*************************** 1. row ***************************
           ID: metadatasharing_create_table_imported_package
       AUTHOR: Dmytro Trifonov
     FILENAME: liquibase.xml
 DATEEXECUTED: 2016-04-28 08:36:55
       MD5SUM: 3:582520a49887eb6fd3e36592693e0730
  DESCRIPTION: Create Table, Create Index
     COMMENTS: Create table metadatasharing_imported_package
          TAG: NULL
    LIQUIBASE: 2.0.5

Very useful information! So the changeset was simply marked as “MARK_RAN” instead of “EXECUTED” because the precondition of of table exists returned true since you already had the table. You can delete that row from the liquibasechangelog table and also delete the metadatasharing_imported_package table. Then restarting the module should run the changeset.

@dkayiwa I decided to drop all metadata sharing module tables and reinstall the module. It is strange though this changeset assumes everything is cool simply because the table exists.

I think your ticket should instead be about this. Things got messed up when switching from using sqldiff to liquibase.xml where the one who did it made some false assumptions. :slight_smile:

I just added a comment on the ticket.

Thanks Willa for reporting the issue! A possible and easy workaround is to first upgrade to 1.1.9 and then to 1.2. As far as I can tell you will experience the issue only if you are upgrading from a version of metadatasharing module that is older than the 1.x release. Given there’s an easy workaround I will mark the issue as information provided unless we see more people hitting the issue.

1 Like