Skip Navigation

[Resolved] Cred Conditional is Showing Undefined Index Error for it's Autogenerated Index

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 22 replies, has 3 voices.

Last updated by Dave 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2530761

Minesh
Supporter

Languages: English (English )

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

I could not able to download the package yet as it asked me to send a request to you. Can you please grant me access so that I can download the package successfully.

#2532993

Apologies Minesh, it was set to "Anyone with a Link" but I think that only means Google Accounts. Either way, I authorised it about 30 minutes after you requested it so it should be fine.

#2533783

Minesh
Supporter

Languages: English (English )

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

After couple of tries I'm finally able to setup your site on my local machine. The issue was caused by the security plugins you have installed.

Now - when I visit the "custom code" section and I found that "woocommerce_refund_functions" code snippet is disabled (not active). With your testing - the code "woocommerce_refund_functions" snippet was active or inactive?

#2533809

Ah yes, I didn't realise the security plugins would be an issue for you, sorry about that.

I don't know why the snippet would be disabled, all snippets should be active. I've just double-checked and there are definitely no disabled snippets on the dev site I'm working on and they weren't when the backup was taken, so please enable them as that's something that's happened in the duplicator transfer.

#2537037

Hi,

Thank you for confirming that.

Just wanted to update you that Minesh is on vacation. He will be able to follow up on this when he gets back tomorrow.

Thank you for your patience.

regards,
Waqar

#2538559

Hi Waqar,

That's no problem, hopefully we can make some progress on this soon.

I've also found that custom validation in general is running but not coming through into the messages field. I haven't figured out the cause yet, but I'm reluctant to start pulling custom validations apart to try and find the cause until I know what's happening with this issue, just in case there is a link.

#2541997

Minesh
Supporter

Languages: English (English )

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

It seems that you are using wrong conditional statement to compare the URL params.

Instead of using the [cred_show_group] shortcode (conditional statement that you should usually use when you want to display dependent fields) - can you please try to use the [wpv-conditional] shortcode that is the correct shortcode to check and display the conditional content.

So, with the duplicator copy and with the form:
=> hidden link

On duplicator copy of your site I've converted all [cred_show_group] shortcode to [wpv-conditonal] shortcode as you can see below:

Are you sure you wish to refund the following order[wpv-conditional if="('[wpv-search-term param='oid1']' ne '')"]s[/wpv-conditional]:<br />

<strong>Order #[order_info id='[wpv-search-term param="oid0"]']</strong>[wpv-conditional if="('[wpv-search-term param='oid1']' ne '')"],[/wpv-conditional]
  
  
[wpv-conditional if="('[wpv-search-term param='oid1']' ne '')"]
<br /><strong>Order #[order_info id='[wpv-search-term param="oid1"]']</strong> [wpv-conditional if="('[wpv-search-term param='oid2']' ne '')"],
[/wpv-conditional]
[/wpv-conditional]
  
  
  [wpv-conditional if="('[wpv-search-term param='oid2']' ne '')"]
<br /><strong>Order #[order_info id='[wpv-search-term param="oid2"]']</strong> [wpv-conditional if="('[wpv-search-term param='oid3']' ne '')"],
[/wpv-conditional]
[/wpv-conditional]
  
  
 
  [wpv-conditional if="('[wpv-search-term param='oid3']' ne '')"]
<br /><strong>Order #[order_info id='[wpv-search-term param="oid3"]']</strong> [wpv-conditional if="('[wpv-search-term param='oid4']' ne '')"],
[/wpv-conditional]
[/wpv-conditional]
  
  
  [wpv-conditional if="('[wpv-search-term param='oid4']' ne '')"]
<br /><strong>Order #[order_info id='[wpv-search-term param="oid4"]']</strong> [wpv-conditional if="('[wpv-search-term param='oid5']' ne '')"],
[/wpv-conditional]
[/wpv-conditional]
  
 
[wpv-conditional if="('[wpv-search-term param='oid5']' ne '')"]
<br /><strong>Order #[order_info id='[wpv-search-term param="oid5"]']</strong>
[/wpv-conditional]

And I can see all those notices are gone. Can you please try to convert all [cred_show_group] conditions to [wpv-conditions] and check if that help you to resolve your issue.

#2542697

That does indeed fix the issue. I had no idea you could use [wpv-conditional] tags on Cred forms, and I guess that means the validation issues are unrelated, so I'm going to go and pull that apart to find the issue there.

But yes, swapping the tags does fix this problem, thank you.