Cannot find a descendant at path [6,0] in node ... Error

default discord avatar
TheDunco
9 months ago
39

I'm developing a blocks field currently, and occasionally when I attempt to reorder a new block that I created I will get this breaking error and the Admin UI will crash. I have to navigate back and reload the page to fix it. I've tried to reproduce consistently but can't seem to unfortunately.



I'm on Payload v1.6.11 btw



@jmikrut Would you know what's going on here? My team is getting frustrated by this

  • discord user avatar
    jmikrut
    Payload Team
    8 months ago

    can you open a GitHub issue about this with as much detail as possible?



    the team will get on it

  • default discord avatar
    TheDunco
    8 months ago

    Will do, thanks



    I'm having some trouble reproducing it consistently, but will speak to my team to see if they can get a video of it happening so I can write up the most detailed issue I can.

  • default discord avatar
    thisisnotchris
    8 months ago

    @TheDunco I have an issue that may be related?



    So I have a Pages collection



    Which, I sort of regret creating as a single collection



    Because then each individual page you end up creating Blocks



    But I had the idea of a Slider Block, for a main page Slider (eww I know)



    Then I got smart and decided, this is going to be a CTA instead (yay)



    Well, I went and changed the name of the model in my source



    Then I went to add a new CTA and my admin panel crashes



    It's because there are remnants of an old Block type that weren't deleted



    and I didn't migrate first, but in this case, I shouldn't have had to really manage the migration



    Because it was such a simple change

  • default discord avatar
    TheDunco
    8 months ago

    Oh, interesting. So you're saying it shouldn't be an issue with newly created ones which would be why I'm having a hard time reproducing it?

  • default discord avatar
    thisisnotchris
    8 months ago

    So say I accidentally noticed I wrote



    SilderBlock



    if i created an instance of a SilderBlock



    and then changed the collection name to SliderBlock



    it will crash on adding new data

  • default discord avatar
    TheDunco
    8 months ago

    Mmm, yeah that might be related but I'm not sure that's the exact issue because I was seeing this when I drag/dropped the block, not when adding new data per say

  • default discord avatar
    thisisnotchris
    8 months ago

    I do think this kind of error should be handled by better error messaing



    but yeah, possibly related maybe not

  • default discord avatar
    TheDunco
    8 months ago

    Thanks for your input though, I can check the document and see if there's any old data in there

  • default discord avatar
    thisisnotchris
    8 months ago

    I would like to see better migration documentation on the Payload site too hehe



    @patrikkozak



    Only because I have no idea what to do about resolving this



    Without redefining the old model type





    :*(

    image.png
  • default discord avatar
    TheDunco
    8 months ago

    I asked about this in #general yesterday and it sounds like there should be some examples in GitHub discussions (although I didn't have time to find any specific examples yesterday)

  • default discord avatar
    thisisnotchris
    8 months ago

    Hehe I saw that thread @TheDunco , but this kind of information NEEDS to be on the Payload site



    It's a crucial time for Payload to appeal to devs



    And detailed documentation is how to appeal to devs

  • default discord avatar
    TheDunco
    8 months ago

    I was able to consistently reproduce this. I'll open an actual github issue with more info after lunch but just for context it's still happening on payload v1.16.17



    I've opened the github issue here

    https://github.com/payloadcms/payload/issues/2272
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.