#Unable to search Internal links from RichText link dialog

40 messages · Page 1 of 1 (latest)

wet citrus
#

It appears to be associated with my orders collection, but I've not seen this error before updating to 1.7.1.

#

@raw kayak Could this also be related to localisation? I see there query includes en locale

Request URL: http://10.0.1.236:3000/payload/orders?where%5Band%5D%5B1%5D%5Borders%5D%5Blike%5D=h&limit=10&page=1&sort=orders&locale=en&depth=0
Request Method: GET
Status Code: 400 Bad Request
GET http://10.0.1.236:3000/payload/orders?where%5Band%5D%5B1%5D%5Borders%5D%5Blike%5D=h&limit=10&page=1&sort=orders&locale=en&depth=0 400 (Bad Request)```
raw kayak
#

Out of office, will touch in when I can

wet citrus
#

super reaction?! Didn't mean to send that!

#

@tulip ledge devs — Is there a way to specify which collections populate the RIchText field links?

i.e. I don't need orders/customers etc to populate this select field.

raw kayak
wet citrus
#

Thanks for the point for enableRichTextRelationship however it doesn't appear to work... anything else I need to do disable these?

#
const Order: CollectionConfig = {
  slug: 'orders',
  admin: {
    useAsTitle: 'orders',
    defaultColumns: [
      'id',
      'customerRelationship',
      'status',
      'products',
      'createdAt',
      'customer',
      'payment',
      'tracking',
      'stripe',
      'dates',
    ],
    enableRichTextRelationship: false,
  },
#

this correct place to add it, right?

raw kayak
#

LGTM

#

Let me try and replicate.

wet citrus
#

They still appear in the select

raw kayak
#

What version of Payload? You're up to date?

wet citrus
#

I've added the same to customers and as you can see not working either

#

im on 1.7.1

raw kayak
#

Just give me a minute, I'm spinning up my env to test in.

wet citrus
#

k - thanks 👍

raw kayak
#

I recreated enableRichTextRelationship not working. Now how do I recreate the issue where it queries? You see that request in the network tab from the edit screen on a collection with the RichText field?

wet citrus
#

yeah that's right - in the network tab

#

it also prints to the console

#

in browser

raw kayak
#

I didn't get that, but my field isn't localized, so I will try that next.

wet citrus
#

mine isn't localised either...

#

but yeah, the locale is in the query... is why I thought it might linked to our previous issue

#

this occurs when any character is entered into the input

raw kayak
#

I lead you astray. The richtext link is different from relationship.

#

enableRichTextRelationship has nothing to do with links, sorry for that confusion.

#

I think we need an extra feature to make rich text links follow the same pattern as relationship, either with the same property or a new one.

wet citrus
#

Oh I see - so at this stage there is no way to disable collections from appearing in this RichText link select drop down?

#

any idea idea after looking into why the orders collection might be causing this to break?

raw kayak
#

This PR is related to what you want to customize, but I think the level of abstraction is not ideal for what you want to do.

#

I would open a feature request on github for enableRichTextLink as a collection admin property.

#

And we can decide how to prioritize it. Also an issue could be made for the link network error you're seeing. I wasn't able to reproduce it quickly.

#

You seem to hit all the pain points, man! I don't know why that is.

wet citrus
#

Ok - so at this time, I'm stuck with a broken RichText link component — is that right? There's no solution at this stage? I need to open a feature request to get this fixed?

rough moat
#

@wet citrus Dan stated that an issue for the broken rich text link should be opened on GitHub.

The feature request comment is in related to your need to limit which relationships are available when creating a link.