Skip to main content
November 18, 2011
Answered

metadataThatTriggersRepublish plugin specific metadata

  • November 18, 2011
  • 2 replies
  • 1034 views

I'm trying to trigger a republish when some plugin specific metadata changes. The docs say I can use (plugin ID).(field ID), but it doesn't seem to be working for me. The plugin ID is "com.500px.publisher", but when I put:

function publishServiceProvider.metadataThatTriggersRepublish( publishSettings )

     return {

          com.500px.publisher.whatever = true,

     }

end

it complains about a malformed number near "500px". When I change the plugin ID to not contain numbers, it complains that it expects a "}" near "=".

So, how can I trigger a republish on some plugin specific metadata?

Thanks.

This topic has been closed for replies.
Correct answer johnrellis

I believe you have to put the id and fieldname in quotes and brackets:

return {["com.500px.publisher.whatever"] = true}

Syntactically, the expression being returned is a table of key/value pairs, where the key is a string.  Since the key has special characters in it (periods), you can't use the simple table syntax {identifier = value}, since identifiers are not allowed to have special characters in them.  Instead, you have to use the syntax above.

2 replies

Known Participant
April 12, 2023

Hey all, 

I'm working on something similar but apparently the republish does not work with custom metadata? 

Is there a way to get a custom metadata trigger a republish event or is it a Lightroom bug? 

Thank you

Rikk Flohr_Photography
Community Manager
April 12, 2023

You’ve posted to a very old thread. It is highly unlikely that the issue described in this thread, though not impossible, is the same issue which you are currently experiencing. Rather than resurrect an old thread that is seemingly similar, you are better posting to a new thread with fresh, complete information including system information, a complete description of the problem and step-by-step instructions for reproduction. 

 

In the unlikely event the issue is the same, we will merge you back into the appropriate location. 

 

Thank you!

 

Rikk Flohr: Adobe Photography Org
johnrellis
johnrellisCorrect answer
Legend
November 20, 2011

I believe you have to put the id and fieldname in quotes and brackets:

return {["com.500px.publisher.whatever"] = true}

Syntactically, the expression being returned is a table of key/value pairs, where the key is a string.  Since the key has special characters in it (periods), you can't use the simple table syntax {identifier = value}, since identifiers are not allowed to have special characters in them.  Instead, you have to use the syntax above.

November 21, 2011

Thanks John. I'll try that and let you know how it goes.

[EDIT: Worked, thanks. Rather new to lua, so I didn't know about that syntax.]