OOD 4.1.1: Custom page with file_quotas widget not working

Hi,

I am trying to create a custom page to display the new file_quotas widget. However, I get this error:

Could not render widget 'file_quotas' because of error

undefined method `sort_by' for nil

when opening the page.

The file_quotas widget works fine for me on the front page. I am using:

custom_pages:
  quotas:
    rows:
      - columns:
        - width: 12
          widgets: ['file_quotas']

help_menu:
- group: "Custom Pages"
- page: "quotas"
  title: "Storage Quota"
  icon: "fas://book"

Other widgets work fine on the page like pinned_apps and system_status, just not file_quotas.
I’m guessing it’s this line here. I have disk quota warnings already configured. Maybe @my_quotasis out of scope on custom pages?

Cheers,

James

Yeah that looks right. It’s why we see undefined method sort_by for nil in the error as @my_quotas is nil outside the dashboard it looks like. This took me a bit to see but the set_my_quotas is basically being called by some controllers, but not the widget_controller itself. You can see the search results here where that method is called:

I’ve opened a feature request to track the work: Allow `widgets_controller` to use `my_quotas` · Issue #5095 · OSC/ondemand · GitHub