Lightroom SDK: LrApplication.developPresetFolders() returns buggy fake folders

  • 7
  • Problem
  • Updated 1 year ago
  • Solved
In LR 7.5, the array returned by LrLrApplication.developPresetFolders() includes buggy fake folder objects intended to represent separator rows in the user interface.  Invoking folder:getPath() on one of these bogus objects raises the internal error:
?:0: attempt to index field '_pathForFolder' (a nil value)
This affects any plugin that attempts to access the develop preset folders. In particular, it broke a DxO plugin and my own Fix Presets plugin (which fixes many other preset bugs):

The workaround is to detect such bogus objects by calling folder:getPath() and trapping any error with pcall().


Here are the results of calling folder:getName() on the array of preset folders:

Note that the bogusly named folders correspond to the presence of separate rows in Develop's Preset panel.

Here's the result of calling folder:getPath() on the second (bogus) array element:

Photo of John R. Ellis

John R. Ellis, Champion

  • 4756 Posts
  • 1294 Reply Likes

Posted 1 year ago

  • 7
Photo of Chinoy Gupta

Chinoy Gupta, Employee

  • 81 Posts
  • 38 Reply Likes
Official Response
Hi John,

Thanks for reporting this. It is indeed a bug in 7.5 and we will fix it in next release. In the meanwhile, as you mentioned you can use pcall to trap the error or you can skip any folder name with value "__@@ThisIsASeparatorRow@@__".

Photo of John R. Ellis

John R. Ellis, Champion

  • 4756 Posts
  • 1294 Reply Likes
Thanks for the update.
Photo of Dirk Holtman

Dirk Holtman

  • 3 Posts
  • 2 Reply Likes
Photo of Patrick Cray

Patrick Cray

  • 17 Posts
  • 2 Reply Likes
I now know why I am unable to transfer files from Lightroom CC Classic to DxO Photolab!
I have to say that this is not the first time an upgrade to Lightroom has broken the plugin.
Photo of Patrick Philippot

Patrick Philippot

  • 540 Posts
  • 166 Reply Likes

See the DxO forum for a temporary fix.
Photo of John Kendall

John Kendall

  • 1 Post
  • 1 Reply Like
If you are not a programmer and this thread is too technical, you can simply use the Adobe Creative Cloud app to download Lightroom Classic CC ver. 7.4.  All will be well and you can wait for the fix to come out while continuing to work. Just click on the down arrow in the "open" box and select version 7.4.  Let it install.  Ignore update prompt.
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 6292 Posts
  • 1402 Reply Likes
Official Response

The Lightroom Classic CC was updated today and contains a fix for this issue. Please download the new version and give it a try and let us know how it works.
Photo of John R. Ellis

John R. Ellis, Champion

  • 4756 Posts
  • 1294 Reply Likes
This is fixed in my LR 8.0, thanks.
Photo of Ganesh Kumar

Ganesh Kumar

  • 1 Post
  • 0 Reply Likes
I still havent seen an update to LR classic CC v8.0 in my CC App.  I have tried to check updates multiple times - is this being pushed one user at a time :-)?  Options?
Photo of John R. Ellis

John R. Ellis, Champion

  • 4695 Posts
  • 1270 Reply Likes
Try logging out of the Creative Cloud desktop app and then back in. That often pokes it into showing you updates.
Photo of Philippe Coudé du Foresto

Philippe Coudé du Foresto

  • 69 Posts
  • 25 Reply Likes
If I remember correctly, <Ctrl>R (on Windows) in the CC application.will usually make the update appear.
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 6162 Posts
  • 1366 Reply Likes
Close.  [Ctrl/Cmd]+[Alt/Opt]+[ R ]

Note: If your OS Is not supported, you won't see the install option in the Creative Cloud App.