"Open Web Page" only be able to redirect to a main page, when "URL parameter" is not blank

Hi,

I did a small test on “Open Web Page” block and found a limitation.

I tested it from the “system” container and calling a page in the “default” container. In my “default” container, there are two pages, “landing” and “Story.” The “landing” is the main page. If I set the block like-

Scenario #1

URL: https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html

and

URL parameter: page=Story

It won’t work. It redirected to the main page (the “landing” page.)

===

Scenario #2

If I set the block like-

URL: https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html?page=Story

and

URL parameter: (blank)

It will work.

===

Scenario #3

If I set the block same as scenario #2 on “URL” and make “URL parameter” not blank, it won’t work. It pointed back to the main page, instead the page I want. My intention is that once the user logged in, I like to redirect him back to the previous page (in here, it is the Story page), which is not the main page, with also passing the “user-token” and “objectId” to that page. See attached graph below.

Is there a way to work around it, or I have to stick with the main page? Thanks.

Pei

Hello @Pei_Shao,

The Scenario #1 should be correct. Please notice that URL Parameters should be an object, not text:

Regards,
Olha

Thank you for your help. It works for scenario#1.

Do you have suggestion for scenario#3? For “URL”, the attachment should be TEXT, right?

I have two variables, redirectToUrl and redirectToPageName and I bind them to two text components.

In the end, redirectToUrl = https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html.

and redirectToPageName = Story

Then, I use “Create Text” block to join them. See below graph.
Unfortunately, they don’t work. I am not sure what to do?

image

Could you please clarify “it doesn’t work” means it doesn’t redirect to the Story page or something else?

The URL parameter you have should work fine. Please check, if the combined text you pass to the URL parameter is really equal to: https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html?Story
URL parameters are also seem to be passed correctly. Please notice that the userToken and userId parameters would be removed from the url string and the new currentUser object will be created.

It works now. The step of moving values in component text to the variables is at the wrong place of the logoc. Thanks a lot for your quick response.

Pei

1 Like

Glad it is working fine now!

Hello @Pei_Shao

We have recently updated our cloud servers and fixed the problem you wrote about earlier. The URL parameters can now be passed in as text.

Regards,
Inna