5 Replies Latest reply on Dec 18, 2009 8:59 AM by john beardsworth

    Schema Error on Mac

    Allen Gambrell Level 1

      I am trying to fix a problem with my plugin, but it works fine under windows. I get the following error on OSX when Lightroom is opened.

       

      An error occurred while reading the schema for the plug-in "PluginName". The plug-in will be disabled.

       

       

      It disables the plugin but I can enable in plugin manager and view all the custom metadata in Lightroom.

       

      Why is this happening on the Mac and not PC?

       

      I am also getting something about access to a undefined global in in mac, but this gobal has nothing to do with the schema?

        • 1. Re: Schema Error on Mac
          SeanMcCormack Adobe Community Professional

          I tore my hair out with that. John Beardsworth got me out of it though. It turned out I didn't have a version set in Info.lua.. i.e

           

          VERSION = { major=1, minor=0, revision=0, build=2, },

           

          just before the final }

           

           

          I renamed my plugin, restarted and away I went. The schema only needs to change for major things. I wish I could find the exact posts for you to read. Maybe John or Eric will jump in.. I'm just a Web Gallery upstart that wrote a few normal plugins.

          • 2. Re: Schema Error on Mac
            SeanMcCormack Adobe Community Professional

            Ah.. looked again:

            There needs to be a version inside each field too. Here's the code from my pikchur plugin

             

             

            return{

            metadataFieldsForPhotos={

             

            {

            id='pikchur'

            },

             

            {

            id="tpicurl",

            version=1.2,

            title = "Pikchur URL",

            dataType='url',

            searchable = true,

            browsable = true,

            },

            {

            id="tpun",

            version=1.0,

            title = "Twitter Username",

            dataType='string',

            searchable = true,

            browsable = true,

            },

            {

            id="tpms",

            version=1.0,

            title = "Twitter Message",

            dataType='string',

             

            },

            },

            schemaVersion = 1, -- must be a number, preferably a positive integer

             

            }

             

            • 3. Re: Schema Error on Mac
              Allen Gambrell Level 1

              Thanks for the quick help!

               

              I would have been at it for days trying to figure that out.

              They really need to include that in the samples and manual.

              • 4. Re: Schema Error on Mac
                SeanMcCormack Adobe Community Professional

                Just as an aside:

                 

                If I wanted to add searchable=true to

                 

                 

                {

                id="tpms",

                version=1.0,

                title = "Twitter Message",

                dataType='string',

                 

                },

                 

                 

                I'd need to increase the version number in that section

                 

                 

                 

                {

                id="tpms",

                version=1.1,

                title = "Twitter Message",

                dataType='string',

                searchable=true,

                },

                 

                 

                And then if I added browsable, I'd also need to update it again.

                • 5. Re: Schema Error on Mac
                  john beardsworth Adobe Community Professional & MVP

                  I think it is in the manual, but (a) you need to read the documentation with a lawyer's eye for detail and nuance, and (b) it looks optional. From p56, on the custom field's version property:

                   

                  "Optional. If present, defines a version number specifically for this field, distinct from the version number defined by schemaVersion in the outer metadata definition script.
                  If you make a change to a field definition that is incompatible with the previous definition (for example, changing the value of searchable), you must bump the field's version number."

                   

                  That's about the only place it's mentioned.

                   

                  John