advanced-cms / advanced-reviews

This is an Open Source add-on that improves the reviewing process and lets external users to view & review content items or whole projects without the need to access the Edit Mode. Created and maintained by Bartosz Sekuła and Grzegorz Wiecheć
Apache License 2.0
17 stars 15 forks source link

External Review link not taking user to correct page when linking to another DXP site #216

Closed AlexandraSerzhanina closed 1 year ago

AlexandraSerzhanina commented 2 years ago

Hi

I have configured local Alloy site. I'm using code from net4_master branch as I'm interesting about .NET Framework 4. I have created admin user and have access to admin view, however I can't see pages tree in CMS Edit view - it is not loading, and there are several issues in console.

image

barteksekula commented 2 years ago

Hi, how did you build & run the app?

AlexandraSerzhanina commented 2 years ago

There are my steps:

barteksekula commented 2 years ago

@AlexandraSerzhanina are you sure there were no build errors? I've just checked and everything seemed to work.

AlexandraSerzhanina commented 2 years ago

@barteksekula no, build is successful - just checked

Actually, I was trying to set up a sample site in purpose to check how external review links are working with links to another DXP site. Maybe you could help me with that question without site setup.

We have multi-site environment, and one site contain external review page with pin code, on that external review page there is link to a page that lives on another DXP site.

The issue is: On that external review page clicking on a link to a page that lives on another DXP site is resulting the user putting in a pin for the external review page again. When that pin is entered, it brings the user back to the page where the external review link originated from, instead of the page the user was trying to reach. So that link is not reachable for external reviewer (at the same time for logged in reviewer link to another DXP site is working properly).

Is it how external review pages are working, and it is expected, so external reviewer has no access to another DXP site, or is there a workaround to fix it?

robert-bondy commented 2 years ago

@barteksekula I wanted to follow-up on this issue and see if you have had a chance to further review @AlexandraSerzhanina's previous comment? This is an on-going issue we have came across multiple times since we last reached out so wanted to see if there were any suggestions or guidance you could offer here. Thanks!

barteksekula commented 2 years ago

@robert-bondy @AlexandraSerzhanina I think I get it. Can you please rewrite this bug's description so it describes the actual problem? Right now it's something about failure to run the sample site (not sure why though).

Also at some point I will need to stop development on legacy .net framework. Do you plan to move to .net core anytime soon?

robert-bondy commented 2 years ago

@barteksekula Alexandra has updated this ticket's title to better represent the issue at hand. Please let me know if you need additional details / information to move forward.

Also, the client we work on behalf of is in the midst of a content migration off of Optimizely and will not be upgrading to cms12, and thus won't be upgrading to .net core anytime soon. We (and our client) understand that by not upgrading to cms12 that we'd run into potential issues / negative impacts such as this so fully understand that you'll need to stop development on legacy .net framework at some point. Do you have any idea on when you intend for that to occur so we can prepare for that and let our client know? Additionally, can you confirm that we will still be able to use the legacy version of Advanced Reviews without any issue as is now, and that simply once you stop doing development on legacy that it'll mean we won't be able to get support if similar bugs appear?

Thank you for your assistance on this issue and for getting back to us. It is greatly appreciated!

cc: @AlexandraSerzhanina

barteksekula commented 1 year ago

Fixed in both .net core https://nuget.optimizely.com/package/?id=Advanced.CMS.AdvancedReviews&v=1.2.2 and in .net framework https://nuget.optimizely.com/package/?id=Advanced.CMS.AdvancedReviews&v=0.9.2

barteksekula commented 1 year ago

@barteksekula Alexandra has updated this ticket's title to better represent the issue at hand. Please let me know if you need additional details / information to move forward.

Also, the client we work on behalf of is in the midst of a content migration off of Optimizely and will not be upgrading to cms12, and thus won't be upgrading to .net core anytime soon. We (and our client) understand that by not upgrading to cms12 that we'd run into potential issues / negative impacts such as this so fully understand that you'll need to stop development on legacy .net framework at some point. Do you have any idea on when you intend for that to occur so we can prepare for that and let our client know? Additionally, can you confirm that we will still be able to use the legacy version of Advanced Reviews without any issue as is now, and that simply once you stop doing development on legacy that it'll mean we won't be able to get support if similar bugs appear?

Thank you for your assistance on this issue and for getting back to us. It is greatly appreciated!

cc: @AlexandraSerzhanina

You will still be able to use .net framework version without any issues. Occasional bugfixes like this one might happen from time to time as well :)

AlexandraSerzhanina commented 1 year ago

@barteksekula after update to 0.9.2 version the issue is still reproduces in case user is not logged in and page is under PIN code.

How it can be reproduced:

barteksekula commented 1 year ago

I dont understand, what do you mean by the fact that the page should have a link to another DXP site?

barteksekula commented 1 year ago

maybe you could record a video of that?:)

barteksekula commented 1 year ago

you are not responding so I assume the issue is fixed. this is how it works for me in the default Alloy

https://user-images.githubusercontent.com/1321664/204084917-812769b4-4165-4422-bfb4-579ace629c8c.mp4

AlexandraSerzhanina commented 1 year ago

@barteksekula sorry, was not able to answer earlier. Here is a video with an example of the issue. In incognito mode after pin code is entered, user is not taking to requested page and redirecting to initial page.

https://user-images.githubusercontent.com/72210943/204242110-8c77f55c-e0c2-4685-b5bc-e99b2ed0cd32.mp4

barteksekula commented 1 year ago

Can you please show me how you defined the link to Page2 ? And how you render the link in the MVC view? We only support linking between project items like this if you use html helpers to render the properties:

The link to your start page 2 should be like this: image

But in your case the previewGenerated is not there. Please look how it works if you use PropertyFor (in my example the link to another site is rendered via ContentArea)

https://user-images.githubusercontent.com/1321664/204266328-555f0c1b-4c55-409f-85f6-62033ab9e19c.mp4

Anyway, for projects you just need to generate the preview link once and all project items will be accessible. No need to input the pin code several times.

AlexandraSerzhanina commented 1 year ago

We are using rich text editor property with link to another page:

image

image

image

To render that property we are using Html.PropertyFor helper.

barteksekula commented 1 year ago

Ok, now I finally understand the problem ; ) So the problem is that we use claims/cookie host-based authentication when using pin security and can only support project items in a single site (under a single hostname).

Unfortunately it is not possible to support a secured (with pin code) preview for a project that spans across multiple sites on different hostnames. However we will at least render link to published version.

barteksekula commented 1 year ago

pushed in https://nuget.optimizely.com/package/?id=Advanced.CMS.AdvancedReviews&v=1.3.1 and https://nuget.optimizely.com/package/?id=Advanced.CMS.AdvancedReviews&v=0.9.3