3 Replies Latest reply on Mar 24, 2011 4:13 AM by areohbee

    updateFromEarlierSchemaVersion

    areohbee Level 5

      How to debug?

       

      Its not working, and the error goes by so fast I have no idea what the problem is.

       

      i.e. If I click 'Enable', then 'OK' when prompted to update catalog, an error message comes up for split second, then the plugin is disabled again - no diagnostic messages are indicated...

       

      This is the (...updateFromEarlierSchemaVersion) function:

       

      local function updateFunc( _cat, previousSchemaVersion, scope )
          local id = "com.robcole.dev.PixelCountMetadata"
          if previousSchemaVersion == 1 then
              local photos = _cat:findPhotosWithProperty( id, 'PixelCount' ) -- ###1 , 1 )
              -- local photos = _cat:getAllPhotos()
              for i, photo in ipairs( photos ) do
                  local pc = photo:getPropertyForPlugin( id, 'PixelCount' ) -- ###1 , 1 )
                  photo:setPropertyForPlugin( _PLUGIN, 'PixelCount', tostring( pc ) )
                  if scope then
                      scope:setPortionComplete( i, #photos )
                  end
              end
          end
      end

       

      I dont recall I've ever been able to get a schema update function to work - always just worked around it...

       

       

      Rob

        • 1. Re: updateFromEarlierSchemaVersion
          areohbee Level 5

          Found the answer from myself, via a previous post, he-he...

           

          http://forums.adobe.com/message/3358149

           

          Still, I've found no way to debug or tell anything about what is going on when its failing - any insight anyone?

           

          If this is just how it is, then this MUST be improved in next SDK release.

           

          Rob

          • 2. Re: updateFromEarlierSchemaVersion
            areohbee Level 5

            OK - I was going for an update to plugin #2, and I am now completely unable to re-release it.

             

            All I did was add a couple metadata items, which I didnt think constituted a need to update the schema. In any case, I've tried and tried, but have not been able to enable the plugin, update the catalog, nor figure any reason why.

             

            H E L P ! ! !

            H E L P ! ! !

            H E L P ! ! !

             

            Rob

            • 3. Re: updateFromEarlierSchemaVersion
              areohbee Level 5

              Got it!

               

              This time I had to bump the version numbers on what were brand new metadata items - although catalog had never been successfully updated with any version number before.

               

              Last plugin I fixed it by NOT bumping the version number on pre-existing item that had changed data-types.

               

              I cant figure this out - this is really ripe for a fix, or an explanation... (yes I've reported it).

               

              Rob