Skip Navigation

[Resolved] WP_Error::getId() with Types + Cred updates

This support ticket is created 6 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 0.93 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Pat 6 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#598210

Pat

Hi Beda,

I cant find in this page your last answer (received by mail), so I think this is linked to the issue encounted by the Toolset site.

Now, I have moved forward, but I'm still facing some issue to integrate correctly the solution proposed in the ticket : https://toolset.com/forums/topic/i-want-to-only-display-the-parent-items-of-the-current-user-in-a-select-box-2/

First, I have a doubt on the solution that is explained in the beginning of the page as no more <input> is integrated in. Can you confirm this (I have tried to add an <input type="hidden" id="parents_id" value="[get-parents]" /> but without success !

Second, the shortcode [get-parents] is working fine and I can get all post that logged user is author.

For any reason, it seem that the value parameter of the Cred parent field is not taken into account. Could you tell me what is the correct syntax to place different values in this Cred parent field and use them as options? Currently, I have something like 123,1234,12345,12334 and only the first info is displayed (Title of 123 id post) in the field in the frontend, but when I click on the selection, then the only possibility is to enter some caracters , which is not what is needed here.

A clear explanation on the syntax of how to populate the Cred parent field with value would be appreciated.
Regards
Pat

#598395

Yes, a mess.

Luckily you received my reply by email, since I have lost it as well.
It was an extensive analysis of the issue + it's solution.

Related to your new questions, we should open a new ticket, because it's a particular custom code issue.
But, I know what happens, let me reply:

If I look at the result of the shortcodes [get-parents-chev] and [get-parents-cava], that's OK, but in the Cred form, I have a selection box that appears and ask to place 2 caracters to find the posts. Then, as soon as 2 caracters are entered, all posts are listed (not only those from the current user !).
Did I miss something?

No, I missed something.
That code works only without the new Select2 Feature that triggers in the CRED front end when you list more than 15 posts.
Basically the whole field Style and JS changed of course, it's now a Select2 instance, while before it was a simple HTML select Field.

Of course, the custom code solution I shared now is not working anymore and I am not even sure it's possible anymore to apply this way.
I will honestly need to investigate, and test.

For that I would love you for opening a new ticket, which I will then take and use it as the base to create an eventual new solution for you and other users.
But then, time evolves, and meanwhile we can split a ticket manually right here and now.
That's what I did, I created a "split" of this ticket, outlining the issue mentioned and asking to test + create a new solution.
You are already following it:
https://toolset.com/forums/topic/custom-code-to-limit-parent-post-selector-is-not-compatible-with-select2/

So let's solve this issue there, and if you agree, close this issue here, as it is solved by using the right syntax on generic Fields populated with ShortCodes.

Thank you.

#598415

Pat

Hi Beda and thanks for your return.

I'm OK with your proposal.
Let's continue with the new ticket.
Regards
Pat