"Open Web Page" behaves differently between main and non-main pages, when exchanging data between default and system containers?

Hi,
I have already checked other topics and could not find a similar one.

Background:
Business rule is similar as Youtube. A non-login user wants to leave a comment and system will redirect him to a login page. Once he finishes login, he then will be redirect back to the page where he came from.

I was only be able to accomplish the first half - redirect the user from page A to login page. In the meantime, I passed three objects from page A to login page successfully.
image

The 2nd half - from login back to page A. The “Open Web Page” block acts differently.
image

It supposes to redirect user to
https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html?page=photoWithComments

Instead, it points to
https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html?page=photoWithComments?photo=15A60520-902F-4F1E-96BC-6C99908EA952

There is an extra trailing text attached behind. That trailing text is the object that I wish to pass to page A.

Also, I got error message in console:

I am confused. Same code, one treats the “URL parameters” in “Open Web Page” block as objects, the other one tries to attach them to the URL address. Am I mis-understood on “URL parameters?” Or it just behaves differently between default and system? Help!

Pei

Hello @Pei_Shao

That was a right behavior. URL Parameters is passed via query string

Also, I got error message in console

Would be great if you add some additional information about that. Where that happens(container/page/component/handler)?

As for that

I am confused. Same code, one treats the “URL parameters” in “Open Web Page” block as objects, the other one tries to attach them to the URL address. Am I mis-understood on “URL parameters?” Or it just behaves differently between default and system? Help!

I believe “passing as object” it’s just fast redirect where we cant catch URL changing. Could you create a demo page where this behavior reproduced?

Regards, Dima.

@Dima ,

Thank you for quick response. To answer your two questions:

  1. Your question: Where that (error message) happens(container/page/component/handler)?

  2. Your question: I believe “passing as object” it’s just fast redirect where we cant catch URL changing. Could you create a demo page where this behavior reproduced?

Two pages:

photoWithComments (in default) → login (in system)

  1. In photoWithComments, I pass three objects to login page by using “Open Web Page” block. The three objects are “currentUrl”, “currentPage” and “currentPhotoId.”
    image

  2. Then, it is redirected to login page. The first thing I do is printing the three objects from Page Data.

Note: three objects sit at the bottom left corner of the above page. Those contents are the exactly ones that I want.

  1. User now is at login page and typing password and email. Once the user successfully login, he will be redirected back to the page where he came from.
    In the meantime, I want to pass an object with it. Then, it failed here.
    image

===
I checked the URLs on these two “passes.”
The successful one is

https://chippermint.backendless.app/api/files/ui-builder/containers/system/index.html?currentPage=photoWithComments&currentPhotoId=15A60520-902F-4F1E-96BC-6C99908EA952&currentUrl=https%3A%2F%2Fchippermint.backendless.app%2Fapi%2Ffiles%2Fui-builder%2Fcontainers%2Fdefault%2Findex.html

The failed one is
https://chippermint.backendless.app/api/files/ui-builder/containers/default/index.html?page=photoWithComments?photo=15A60520-902F-4F1E-96BC-6C99908EA952

The only difference is the failed one has two question marks. (The first question mark was generated by me and the 2nd one was generated by your system.) The other difference is that “photoWithComment” is not the main page in default container and “login” is the main page in system.

Pei