When I begin to search within the internal document select field, it immediately returns a red 'an error has occurred' message.
Here's a link to a screen recording of the event, and the error printed to the console:
It appears to be associated with my orders collection, but I've not seen this error before updating to 1.7.1.
@dribbens 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)
Out of office, will touch in when I can
super reaction?! Didn't mean to send that!
@payloadcms 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.
@jakehopking is
&sort=orders
correct in your query? That seems odd. Do you have a field named orders on your orders collection?
Is there a way to specify which collections populate the RichText field links?
Look at enableRichTextRelationship:
https://payloadcms.com/docs/configuration/collections#admin-optionsThat's not my query. It's coming from the select in richtext link dialog.
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?
LGTM
Let me try and replicate.
They still appear in the select
What version of Payload? You're up to date?
I've added the same to customers and as you can see not working either
im on 1.7.1
Just give me a minute, I'm spinning up my env to test in.
k - thanks 👍
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?
yeah that's right - in the network tab
it also prints to the console
in browser
I didn't get that, but my field isn't localized, so I will try that next.
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
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.
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?
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.
https://github.com/payloadcms/payload/pull/2559/files
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.
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?
@jakehopking 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.
Thanks for the clarification 👍
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.