Skip to main content
dw24154351
Known Participant
September 26, 2022
Question

createPublishedCollectionSet issue - name parameter is missing or is not a string

  • September 26, 2022
  • 1 reply
  • 136 views

I'm calling LRPublishService version of createPublishedCollectionSet

 

An internal error has occurred.

LrCatalog:createPublishedCollectionSet: name parameter is missing or is not a string

 

But the name parameter is checked prior to confirm it is a string.

 

publishService:createPublishedSmartCollection( name, searchDesc, parent, canReturnExisting )
Creates a new published smart collection in this publish service.
 
It is being called with a catalog:withWriteAccessDo closure.
 
I presume the publish service is calling into the catalog version of createCollectionSet.
 
Using the latest version 11.5 and the 11-2 SDK. macOS Monterey. M1.
 
So the internal error message doesn't seem to make sense given that I'm passing a string as the first argument. I've even forced the call with a string literal and that doesn't work either.
 
The search criteria comes from code that is already creating working Collections. 
 
I'm wondering if it is failling but incorrectly reporting.
 
(lua is not a code sample option....)

 

	catalog:withWriteAccessDo("Create Publish Smart Collection", function()
		if type(name) ~= "string" then
			log("name is not a string", "error")
		end

		local result = theService.createPublishedCollectionSet(name, publishedCollectionSet, nil)

		if result ~= nil then
			log("created published smart collection %q", name)
		else
			log("problem creating smart collection %q", name)
		end

	end)

 

This topic has been closed for replies.

1 reply

dw24154351
Known Participant
September 27, 2022

. vs : in lua makes a difference.

 

In the dot form, self is the first arg being passed.