Jump to content

System Preferences items aren't displayed or filtered correctly


sudopeople

Recommended Posts

Alfred 4.5.1

Build 1256, Monday 9th August 2021

 

macOS Big Sur

Version 11.6 (20G165)

 

 

When searching for System Preferences in Alfred, items are displayed with the extension `.prefPane` and their name is not always display friendly.

1200816848_ScreenShot2021-10-09at8_36_59AM.png.93265e7a9bbb86c17a78ced25439a4cb.png

 

 

Also, typing "printer" doesn't show a result for `Printers & Scanners` since the prefPane name is `PrintAndScan.prefPane` (no "er" in the name).

1502861926_ScreenShot2021-10-09at8_37_25AM.thumb.png.695b29630bcae1578cb393adda2c97a0.png

 

 

Some of the System Preferences entries don't share the name of their prefPane file at all, eg. `Users & Groups` doesn't show up when typing "users" or "groups" since the file name is `Accounts.prefPane`.

1075693321_ScreenShot2021-10-09at8_48_32AM.thumb.png.efa51ab45f51e11590810b24d2890991.png

2001482850_ScreenShot2021-10-09at8_46_33AM.thumb.png.e80178900b0ba24a2ab439cff9a1498e.png

 

 

If you tab complete a highlighted prePane entry, you'll also get another item to "Open the typed URL" since Alfred recognizes the filename as a link.

2071900093_ScreenShot2021-10-09at8_37_43AM.thumb.png.6ce402a2879dc7ffdeaf76b110ccf86d.png

 

Link to comment
Share on other sites

20 hours ago, Andrew said:

Alfred gets the names for these from macOS itself.

 

I'm not sure I follow. If Alfred gets these from the OS, why would their output in Alfred change, and why would clearing caches change that?

 

My assumption has been that these names changed in Big Sur. I just got around to updating, and this is when the issue began.

Regardless, neither reloading Alfred, or Rebuilding metadata had any affect. In fact, the metadata rebuilding process seems quite error fraught.

170229855_ScreenShot2021-10-11at9_34_36AM.thumb.png.c5aedc7b34b9e03a614d1ede0acf1386.png

1793266615_ScreenShot2021-10-11at9_34_50AM.thumb.png.b3012aefde915a6d4ae2f93602dcc64a.png

This appears to just be stuck:139120357_ScreenShot2021-10-11at9_35_34AM.thumb.png.c9858a2bf6f4160f06890852ff6d87ff.png

I've also tried not deleting .Spotlight-V100 and I've gotten various other errors depending apparently, on the time of day, lol.1380582599_ScreenShot2021-10-11at9_44_06AM.thumb.png.e80a042780bc2818c1bf8a04ecf9acb3.png

 

This process is difficult and far from user friendly, and it's always frustrating to hear "delete your cache" or "restart your computer". And apparently the *.prefPane issue is just my machine so I guess I'll just live with it. ‾\_(ツ)_/‾

Edited by sudopeople
Link to comment
Share on other sites

7 hours ago, sudopeople said:

This also appears to have screwed up my Spotlight Privacy list

 

Your metadata index is probably screwed up. That's why Alfred and Spotlight aren't working properly.

 

8 hours ago, sudopeople said:

it's always frustrating to hear "delete your cache" or "restart your computer".

 

It's frustrating to have to tell you that, too, but the problem is on Apple's side of the fence and these are the only options they've given us.

Link to comment
Share on other sites

Thanks for the responses, guys.

 

I just want to make it clear that running the "Rebuild macOS Metadata" script in Alfred is what's corrupted my Spotlight index. Everything worked fine before that minus the relatively minor issue I raised at the start of this thread. The script's messaging is incredibly confusing, and presumably it's quite old. Saying it doesn't work would be an understatement, it's destructive. I recommend others avoid using it at all costs.

 

The primary reason for my frustration by the way, is not just because I don't "feel like" clearing caches or whatever. It's because these types of things rarely work, and as such are a waste of time. In this case it's made things worse. Since the script corrupted Spotlight I've tried various fixes researched online and nothing's resolved it. Hopefully I'll find resolution at some point.

 

Back to my original post: it's seems to me like Alfred should easily be able to remove the .prefPane extension. Even if it's an edge case, it seems like a trivial addition.

 

Thanks again for such an amazing product though. I'm sure it's not easy fielding random problems day in and day out. You guys have always been quick to respond and I'm grateful for that. 🙏

Link to comment
Share on other sites

@sudopeople your very first screenshot is a good example of why you can't just remove the .prefPane extension. The actual name of the item is provided by macOS to Alfred via the metadata index, and is localised to whichever language your Mac is set to. In your case, macOS should return "Printers & Scanners" for PrintAndScan.prefpane.

 

On 10/11/2021 at 5:46 PM, sudopeople said:

This process is difficult and far from user friendly, and it's always frustrating to hear "delete your cache" or "restart your computer".


When I recommend to clear Alfred's cache, this simply flushes Alfred's local temporary performance cache. When the underlying metadata index is malfunctioning, Alfred may be holding on to a cache of when the name was being passed back incorrectly, and this is a very fast first check which resolves the issue in almost all cases.

 

14 hours ago, sudopeople said:

I just want to make it clear that running the "Rebuild macOS Metadata" script in Alfred is what's corrupted my Spotlight index.

 

Alfred doesn't index himself, he relies on the underlying macOS Index for file search data, and these localised names of folders, files, prefs and apps.

 

Alfred's mechanism for rebuilding the macOS metadata index is via one of the only scriptable methods Apple supply, and I leave the technical aspect of this visible, as it's outside of Alfred's control and I want people to understand that they are performing a lower level macOS command.

 

When using the shortcut in Alfred's preferences, Terminal opens and the following well documented macOS command is run:

 

sudo mdutil -E -i on /

 

The -E requests to erase the current store, -i on / ensures that the index is enabled on the main drive. In combination, these cause macOS to rebuild the metadata.
 

14 hours ago, sudopeople said:

Saying it doesn't work would be an understatement, it's destructive. I recommend others avoid using it at all costs.

 

This is in fact the first time I've heard of the Spotlight Privacy preferences being broken as per your last screenshot, so I believe your issues in macOS will be deeper rooted than the metadata index, and more towards permissions issues, or corruption in your install of macOS itself. I also think that the issues you're seeing now would have manifested themselves sooner or later regardless of using the rebuild (i.e. Alfred doesn't interact with the Spotlight Privacy prefs in any way).

 

I hope this help you and others reading this understand that rebuilding the metadata should be a safe exercise if you're experiencing file search or naming issues.

 

Please let us know how you get on, or if you find a solution. While the issue you're experiencing is rare, it's good to build a wealth of information on this forum which can potentially help future users.

 

Many thanks,

Andrew

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...