0
  • In Disconnected mode
  • JSS Tech Preview 3
  • Sample vue JS

I have a component : data/component-content/Footer-nav With an ID : ID__footer-nav

I can link all my pages to this component perfectly:

"PH__footer": [
    {
        "id": "ID__footer-nav"
    }
]

Nevertheless, if I create a new placeholder inside this component

<placeholder name="PH__footer-col" :rendering="rendering" />

and add data in my Footer-nav/en.json, I have this error in my console.log:

#Placeholder 'PH__footer-col' was not found in the current rendering data
{
  "uid": "{3FC3DAE1-AA1D-5D7E-997D-9AB58DFFE0F9}",
  "componentName": "FooterNav",
  "dataSource": "available-in-connected-mode",
  "params": {},
  "fields": {
      #(... I hide them for clarity ...)
  }
}
  • My data are in my manifest
  • If I put my data in routes/en.json (bellow the ID) instead of routes/component-content/Footer-nav/en.json, I have not this problem.

Any ideas ?

Thanks!

  • Can you share the JSON returned by the disconnected layout service (devtools network tab in the browser)? I just tried this on the latest Vue sample (using YAML routes, but should be equivalent source data) by changing the name of the main placeholder to PH__footer-col in the route file and the App.vue and it worked ok for me. – Kam Figy May 29 '18 at 14:15
  • Also, check that the placeholder data makes it to the /sitecore/manifest/sitecore-import.json file when you run jss manifest -c - that can diagnose further whether the issue is in manifest data generation, or the disconnected layout service that pulls data from that manifest. – Kam Figy May 29 '18 at 14:17
  • I have edited my Question to add more details and I can confirm that ma placeholder data are in my manifest, so I think the issue is from the disconnected layout service. For information my placeholders are nested like this : PH__footer > PH__footer-col – tomagladiator May 30 '18 at 11:04
1

Based on a Slack conversation just now, the issue here was that the expectation was that using an ID reference to pull in a shared component content would also pull in child layout.

ID references in a route are shared content references, but do not support child placeholders within the ID-referenced component (i.e. you cannot define placeholders on something in /data/component-content).

Placeholders can be defined on the route item that refers to the shared content item under the ID reference, e.g.:

- id: component-shared-id
  placeholders:
    PH__footer-col:
    - id: footer-shared-1
  • Thanks, it's works for me but of course, I need to create a lot of folders because each link in my footer-nav is a component inside a placeholder, inside a component, inside a placeholder, inside a component... – tomagladiator Jun 1 '18 at 17:23
2

I had this same error today and in my instance it was due to my adding a new placholder to the layout (code first) and not adding it to the rootPlaceholders setting in package.json (AFAIK this is only referenced in the JSS 11 release notes)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.