Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I fill out url field with display_url in http redirect task of workflow,please? #14967

Closed
effapp opened this issue Dec 30, 2023 · 11 comments
Milestone

Comments

@effapp
Copy link

effapp commented Dec 30, 2023

Hi,
How can I fill out url field with display_url in http redirect task of workflow,please?

image

{{ Workflow.Input.ContentItem | display_url }} is not correct.

@MikeAlhayek
Copy link
Member

Maybe the ContentItem is not in the input

try

{{ Workflow.ContentItem | display_url }}

If you are trying to redirect back to a form location. In OC 1.8 we have a new task that would allow you to redirect the user back to where the form was originated from.

@effapp
Copy link
Author

effapp commented Jan 3, 2024

Hi MikeAlayek,
Can you add the property display_url to ContentItem like display_text ?

@effapp
Copy link
Author

effapp commented Jan 3, 2024

Maybe the ContentItem is not in the input

try

{{ Workflow.ContentItem | display_url }}

If you are trying to redirect back to a form location. In OC 1.8 we have a new task that would allow you to redirect the user back to where the form was originated from.

Hi,

{{ Workflow.ContentItem | display_url }} throw exception, Workflow.ContentItem is null

@MikeAlhayek
Copy link
Member

Then {{ Workflow.Input.ContentItem | display_url }} should have worked assuming your workflow event is a content item based.

What event are you using to start your workflow?

@effapp
Copy link
Author

effapp commented Jan 4, 2024

Then {{ Workflow.Input.ContentItem | display_url }} should have worked assuming your workflow event is a content item based.

What event are you using to start your workflow?

I used Http Request Event to start my workflow. {{ Workflow.Input.ContentItem | display_url }} render nothing.

@MikeAlhayek
Copy link
Member

I think that is what you are doing wrong. I think for ContentItem to exists, you'll need to add a content item event like Created, updated or published content

@effapp
Copy link
Author

effapp commented Jan 4, 2024

I think that is what you are doing wrong. I think for ContentItem to exists, you'll need to add a content item event like Created, updated or published content

If I want to use Http Request Event to start my workflow and want to ContentItem to exists, What should I do,please?

@MikeAlhayek
Copy link
Member

What is the logic that you are trying to handle in workflow?

@effapp
Copy link
Author

effapp commented Jan 4, 2024

What is the logic that you are trying to handle in workflow?

I'll submit the form of the ContentItem display page to trigger workflow, then it redirect to {{ Workflow.Input.ContentItem | display_url }} in the last activity "http redirect task" of workflow.

@sebastienros sebastienros added this to the backlog milestone Jan 4, 2024
@zl2fxy
Copy link
Contributor

zl2fxy commented Jan 5, 2024

Your workflow doesn't seem to be initiated by content items, so there's no input inside. Can I take a look at your workflow page? I need to know more information to assist you.

@effapp
Copy link
Author

effapp commented Jan 6, 2024

Your workflow doesn't seem to be initiated by content items, so there's no input inside. Can I take a look at your workflow page? I need to know more information to assist you.

Hi, the answer is shown as following figure:
image

@OrchardCMS OrchardCMS locked and limited conversation to collaborators Jan 9, 2024
@MikeAlhayek MikeAlhayek converted this issue into discussion #15022 Jan 9, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

5 participants