A 'Search for' in a workflow action doesn't work in Live!

I can’t work out why a ‘search for’ expression in a workflow action works fine in Dev, but not Live. Exactly the same search expression works, when part of the page editor, in Live:

                                   Dev         Live

Works when in a workflow action        Yes         No!!!     

Works from page editor                Yes         Yes

I’ve verified using multiple methods that the data does exist in the type, and that the workflow action doesn’t work. Other searches from actions work fine in Live. The search constraints I use should find stuff (as verified in Dev and through the page editor).

The workflow has steps after this search which are not performed because for some reason this search fails.

I could put any search constraint there, and it would still fail.

Any ideas?

Have you checked the Privacy settings on the thing?

I have, but I can’t see anything. Should it be different?

So long as the current user is an Instructor or a Student then it should work yes.

They are… :thinking:

I know you said you have verified that the data exists in the data type, but you didn’t mention anything about the development database vs. the live database. When there is an issue like the one you described, it is very often the case that the data doesn’t exist in the live database. Are you sure the data exists in live?

I’m sure, yes. I’ve checked manually, and also done simple constraints like a field ‘is not empty’.

Are the privacy settings on Lessons also allowing Instructors & Students to find them in searches? Otherwise the criteria for “Lesson isn’t empty” in your search might be falling foul of the privacy rules.

The privacy settings are shown in the screenshot above. ‘Find this in searches’ is checked.

Hi Andrew, those are the privacy rules for Lesson transactions, not for Lessons (which is relevant to the criteria of the search from your original post). Are the privacy rules for Lessons the same?

I’ve also tested with no privacy settings at all, and it still fails. However, correct me if I’m wrong, but there are no differences in privacy settings between Dev and Live. it works in Dev.

Sorry, I didn’t see you write just ‘Lessons’. The rules for Lessons are:

That looks good & normal to me!

Is it possible for you to load the lesson transaction in an element on the page (e.g. as the content type of a group), and amend the workflow action so it changes that instead?

If I understand you right, you mean:
a) Display some fields from the lesson transaction as text, using a parent group of lesson transaction
b) Make the action try and display some of that text?

I’ve done both, and it works in Dev but not Live.

What do you mean the search ‘fails’? How do you know?

Have you tried displaying an alert with ‘Search for Lesson transactions:first item’s unique ID’ before and after the workflow action? If those are both empty, then the issue is extremely likely to be that the relevant data doesn’t exist or the user is restricted by privacy rules (e.g the current user isn’t the lesson transaction’s student or instructor).

Not quite - set a group’s type of content to be Lesson transactions, and make the value of that specific group Search for Lesson transactions:first item

Then, in the workflow, you can make the thing to change Group A's Lesson transaction. Just suggesting this as a way of making sure it’s not specifically the workflow step that’s failing.

I figured it out! I have a problem with a configuration for my Stripe plugin, or Stripe itself. I have a plugin action creating the value of one of the Transaction fields, and for some reason it fails in Live. (I believe the Live API keys are correct, so I’ll check further).

I thought I eliminated Stripe from the workflow, but it was still part of it as Step 3.

Thanks for your help!


Glad to hear you found it in the end! :grin:

This topic was automatically closed after 70 days. New replies are no longer allowed.