XF Field throws an error while giving auto suggestions | Community
Skip to main content
September 11, 2025
Solved

XF Field throws an error while giving auto suggestions

  • September 11, 2025
  • 2 replies
  • 650 views

I have a XF field in my component with resource type as : cq/experience-fragments/editor/components/xffield
and i have given one property rootPath as /content/experience-fragments.
Now when i type anything in this field it throws an error as failed to load next page

 

If i give rootPath as /content/experience-fragments/myproject then this error doesnt show up. But i want to have rootPath as /content/experience-fragments only. Any solution to this?

Best answer by SantoshSai

Hi @javedkh,

Try this: In the Template Editor - Component Policy for your field, set rootPath to each site’s XF folder (e.g., /content/experience-fragments/brand-a). Same dialog, just scoped per site. This is the clean, supported way.

If you really need rootPath=/content/experience-fragments

  • Don’t browse; search. Swap the xffield for a pathfield that opens the XF picker in search mode so authors type a few chars instead of expanding the whole tree.

  • Also help it scale by organizing XFs into brand/locale subfolders so search hits fewer results.

 

2 replies

giuseppebaglio
Level 10
September 11, 2025

hi @javedkh

maybe the error happens because the field tries to load all content fragments under that root path, which can be very large and cause pagination or loading issues. When you restrict rootPath to something narrower like "/content/experience-fragments/myproject," the loading works fine because the scope is limited. 

JavedKhAuthor
September 11, 2025

Yes correct. I want to resolve this pagination issues

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
September 12, 2025

Hi @javedkh,

Try this: In the Template Editor - Component Policy for your field, set rootPath to each site’s XF folder (e.g., /content/experience-fragments/brand-a). Same dialog, just scoped per site. This is the clean, supported way.

If you really need rootPath=/content/experience-fragments

  • Don’t browse; search. Swap the xffield for a pathfield that opens the XF picker in search mode so authors type a few chars instead of expanding the whole tree.

  • Also help it scale by organizing XFs into brand/locale subfolders so search hits fewer results.

 

Santosh Sai