Page Builder Not Working in Spark (API v2)

  • 1
  • Problem
  • Updated 1 month ago
  • Solved
  • (Edited)
Hi - when trying to use the page builder to create a new page (API v2) I get this error: 

1. There was a problem rendering a component of type skuid__pageBuilder: Cannot read property 'indexOf' of undefined

Here's a gif of the error happening:

https://cl.ly/4944d1bf878a
Photo of Kaede Holland

Kaede Holland

  • 2,986 Points 2k badge 2x thumb
  • too excited to try out spark

Posted 1 month ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,556 Points 20k badge 2x thumb
Hi Kaede, bummed that you're getting an error just trying to open the Page Composer :( 

Can you open the Chrome JavaScript Console and copy/paste any error messages that appear there? Thanks!
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 17,264 Points 10k badge 2x thumb
Do you have access to Skuid Page Builder?
Photo of Kaede Holland

Kaede Holland

  • 2,986 Points 2k badge 2x thumb
I can open the page builder for pages with API v1
Photo of Kaede Holland

Kaede Holland

  • 2,986 Points 2k badge 2x thumb
Hi Zach! Sure thing: 
login.salesforce.com/17181/logo180.png Failed to load resource: the server responded with a status of 404 (Not Found)
skuidReqs.js:1 JQMIGRATE: Migrate is installed, version 3.0.1
skuidReqs.js:1 There was a problem rendering a component of type skuid__pageBuilder: Cannot read property 'indexOf' of undefined
log @ skuidReqs.js:1
skuidReqs.js:1 TypeError: Cannot read property 'indexOf' of undefined
    at d (skuidReqs.js:1)
    at Object.createIcon (skuidReqs.js:1)
    at i (/resource/1544119245000/skuid__next/js/builderReqs.js:2)
    at $.eval (/resource/1544119245000/skuid__next/js/builderReqs.js:2)
    at Function.each (skuidReqs.js:1)
    at new o.ComponentsViewer.t.ComponentsViewer (/resource/1544119245000/skuid__next/js/builderReqs.js:2)
    at Object.render (/resource/1544119245000/skuid__next/js/builderReqs.js:2)
    at I.render (skuidReqs.js:1)
    at I.conditionallyRender (skuidReqs.js:1)
    at k (skuidReqs.js:1)

Photo of J.

J., Official Rep

  • 7,694 Points 5k badge 2x thumb
Hmmmm... This is a bit of a guess, but try it in an Incognito Window. We have seen some bizarre caching issues post upgrade before, but if the behavior is the same in an IW, that will rule that out right away. 
Photo of Kaede Holland

Kaede Holland

  • 2,986 Points 2k badge 2x thumb
I just tried in incognito and get the same behavior.
Photo of J.

J., Official Rep

  • 7,694 Points 5k badge 2x thumb
Official Response
OK, I think I might have figured it out. I was able to reproduce the behavior and find a potential workaround, but beware: it's a little round about, and I'm not sure what side effects it might have for you, so you'll want to do some v1 testing if this works. Try this:
  1. Go to Salesforce Setup > Develop > Custom Settings
  2. Click Manage next to the Preference record (skuid namespace, in case you have another Preference Custom Setting)
  3. Click the Edit button at the top
  4. If Use Component Packs is unchecked, check it and click the Save button
  5. Try it again
If anything breaks for you, you can always uncheck that box and save again. We will look into fixing this behavior, but let us know if this gets you back in business or not!

Photo of Kaede Holland

Kaede Holland

  • 2,986 Points 2k badge 2x thumb
Yay!!! It worked! Thank you so much!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,556 Points 20k badge 2x thumb
For others experiencing this issue, the workaround is to check Use Component Packs as J describes above.

We will be fixing the issue in next Spark patch, 12.0.2.