Is there a bug in the tutorial, or am I doing something wrong?

Enonic version: 7.14.4
OS: Win11

Hi! I’m new to Enonic, so I don’t have many legs to stand on here. Maybe I’ve made an error somehow, but the issue is as follows:

I’m doing this tutorial stable - Enonic Developer Portal, and everything goes well until I have to use query in this file:

import {APP_NAME_UNDERSCORED} from '@enonic/nextjs-adapter';

const getPerson = `
query($path:ID!){
  guillotine {
    get(key:$path) {
      displayName
      ... on ${APP_NAME_UNDERSCORED}_Person {
        data {
          bio
          dateofbirth
          photos {
           ... on media_Image {
              imageUrl: imageUrl(type: absolute, scale: "width(500)")
              attachments {
                name
              }
            }
          }
        }
      }
      parent {
        _path(type: siteRelative)
      }
    }
  }
}`;

export default getPerson;

The problem is that “bio” causes the following error:

1 error(s) when fetching data from: (localhost stuff)/site/intro/master
{

  • errorType: ‘ValidationError’,*
  • message: “Validation error (SubselectionRequired@[guillotine/get/data/bio]) : Subselection required for type ‘RichText’ of field ‘bio’”,*
  • locations: [ { line: 7, column: 11 } ],*
  • validationErrorType: ‘SubselectionRequired’*
    }

“bio” is also highlighted in the query playground, so the intellisense reports the same issue.
If I just remove bio from the query, the page renderes fine, just with the data missing ofc.

Am I doing something wrong, or is there a problem with the tutorial?

1 Like

Hi. This is indeed a bug in the turorial. After changing the person content type in the dataset, the tutorial has not been updated.

Just exclude the code related to the bio field, and ypu can move on. We’ll fix this shortly

2 Likes