Skip Navigation

[Resolved] Relationship "Connection" not working – Post type has only 1 character

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 3 voices.

Last updated by matthewS-8 1 year, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2535763
Screenshot 2023-01-16 at 1.37.06 PM.png

I am trying to:
Connect a relationship post type to a record through the relationship section of the page. For example, I have a House record that I want to connect an "Exterior" post type to. The Exteriors are letters A - N. However, the field to connect is looking for 3 characters to query. I don't have 3 characters. I believe this is a new behavior since the last updates.

Link to a page where the issue can be seen:
(backend) hidden link

I expected to see:
My list of exterior records pop up (Letters A through N)

Instead, I got: (Screenshot) and a message that I need to enter 2 more characters

I am able to do the reverse - Connect a House Record to and Exterior. But that's not the way information is usually entered.

#2536099

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I will have to check what file is called when you try to search with the select2 search box.

Can you please share problem URL where you want to search with one character as well as admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2537139

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Matt,

Thank you for sharing the access details.

Minesh is on vacation, so I'll be following up on this ticket.

The minimum length for the input characters was set to 3, to limit the number of AJAX calls to the server and thus improve performance. However, I can see that it can be a challenge for cases like yours, where the post titles are set to have only a single alphabetical character.

I'm afraid, there is no hook or filter available, to change this behavior through code customization, so it will require editing the core file in the Toolset Types plugin.

In the file "/wp-content/plugins/types/public/page/extension/related_content/viewmodels/ListingViewModel.js", you'll find the following code at line 456:


minimumInputLength: 3,

You can change that value from '3' to '1' and the AJAX search for the related posts dropdown will start, even with a single character input.

Note: Future updates to the plugin will overwrite any changes that you've made to the plugin files directly and you'll have to add back those changes again.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2539093

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.