Skip to content
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

404 error on using editable link #53

Closed
karorapepper opened this issue Jul 2, 2019 · 8 comments · Fixed by #75
Closed

404 error on using editable link #53

karorapepper opened this issue Jul 2, 2019 · 8 comments · Fixed by #75
Assignees
Labels
bug Something isn't working
Milestone

Comments

@karorapepper
Copy link

Hi,

Thanks for creating this very useful addon.
However I am getting 404 error on loading the Editable External Review link. I am able to use rest of the features fine. The view only link works well too (although it adds an additional /en before /externalContentView resulting in 404 as well but was able to get around that by adding redirect to remove /en) but edit link keeps giving 404 error. Can anyone help in this regard?
I have already added the ExternalReviewInitialization file and set EdiatbleLinksEnabled option to true.
Another question what is the use of following 3 ExternalReviewOptions:
public string ReviewsUrl { get; set; }
public string ContentPreviewUrl { get; set; }
public string ContentIframeEditUrlSegment { get; set; }

Thanks.
ExternalReview 404 Error
ExternalReviewInitialization Code

@barteksekula barteksekula added this to the 0.2.0 milestone Jul 2, 2019
@barteksekula barteksekula added bug Something isn't working duplicate This issue or pull request already exists labels Jul 2, 2019
barteksekula added a commit that referenced this issue Jul 2, 2019
Read url from start page to check if globalization is enabled or not.
If it's turned off the "review urls" should not contain the language
fragment.

Closes #47
Closes #53
@barteksekula barteksekula self-assigned this Jul 2, 2019
@karorapepper
Copy link
Author

Hi @barteksekula The 404 issue I am getting is not same as globalisation Url issue due to language fragment. In my case even after removing the language fragment the (Created as Edit) editable external reviewer urls are returning 404 error while View only external reviewer urls are working fine. Is this something you have already fixed? Please read more details in comment above. Thanks!

@barteksekula
Copy link
Member

barteksekula commented Jul 7, 2019

@karorapepper I've just checked once again to be sure but everything seems to work just fine.
an example url for an external reviewer is as follows (never contains the language branch):
http://example.com/externalContentReviews/da996ac1-418e-4a0a-990a-e03d85cd72a1
however urls for "view" are like this (this one has the language branch):
http://example.com/en/externalPageReview/da996ac1-418e-4a0a-990a-e03d85cd72a1

Could you please share more details? What user are you trying to log on after opening 'externalContentReviews/' path?
It seems we did not describe it clear enough in the documentation but it's only the ExternalReviewers group members that are allowed to access that path (defined in web.config)

Please try with https://nuget.episerver.com/package/?id=Advanced.CMS.AdvancedReviews&v=0.2.1 and let us know.

barteksekula added a commit that referenced this issue Jul 8, 2019
Restructure solution

Approved-by: Grzegorz Wiecheć <gregorwiechec@gmail.com>
barteksekula added a commit that referenced this issue Jul 8, 2019
Read url from start page to check if globalization is enabled or not.
If it's turned off the "review urls" should not contain the language
fragment.

Closes #47
Closes #53
@barteksekula
Copy link
Member

@karorapepper did this work for you?

@karorapepper
Copy link
Author

hey @barteksekula, nope the issue not resolved yet, the editable reviewer link still gives 404. I assumed it may have something to do with permissions setup for content editor user roles which is not allowing to create pages in editable mode. However my content editor/reviewers only needed viewable links hence didn't pursue for the solution. Though would be good to find a solution.

@karorapepper
Copy link
Author

Also @barteksekula from your previous comment I think you are mixing two different issues I was talking about -

  1. which you already fixed in later version, was the language branch code (en etc) was getting appended to url. I managed to fix this by using redirects until we had the version fix. So this is not a problem.
  2. The problem was only with pages for which content editors created preview in "edit" mode. Those when logged in with "ExternalReviewers" or any role always gave 404. As if the page never got created when clicked on Edit button using plugin only a url is generated with new guid each time but no page to view.

@barteksekula barteksekula removed the duplicate This issue or pull request already exists label Oct 16, 2019
@barteksekula barteksekula reopened this Oct 16, 2019
barteksekula added a commit that referenced this issue Oct 16, 2019
Regression after #64. When setting the token to a draft version
it is not possible to render the page (access denied).
But the token is needed because otherwise it is always the StartPage
that is set in currentContentContext.Content in ContentPropertiesStack.
Using an ID without workid solves the problem, correct
data-epi-property-name attributes are rendered.

Closes #71
CLoses #74
Closes #53
@barteksekula barteksekula modified the milestones: 0.2.0, 0.3.1 Oct 16, 2019
barteksekula added a commit that referenced this issue Oct 17, 2019
Regression after #64. When setting the token to a draft version
it is not possible to render the page (access denied).
But the token is needed because otherwise it is always the StartPage
that is set in currentContentContext.Content in ContentPropertiesStack.
Using an ID without workid solves the problem, correct
data-epi-property-name attributes are rendered.

Closes #71
CLoses #74
Closes #53
barteksekula added a commit that referenced this issue Oct 17, 2019
Regression after #64. When setting the token to a draft version
it is not possible to render the page (access denied).
But the token is needed because otherwise it is always the StartPage
that is set in currentContentContext.Content in ContentPropertiesStack.
This fix will make sure that the Authorize filter will not be used when
the request is in external review context.

Closes #71
CLoses #74
Closes #53
@barteksekula
Copy link
Member

@barteksekula
Copy link
Member

@karorapepper does it work for you now?

@barteksekula barteksekula reopened this Jun 19, 2020
barteksekula added a commit that referenced this issue Jun 19, 2020
It has to be done here, after the routing is already done and before
controller render the HTML

Closes #53
@barteksekula barteksekula modified the milestones: 0.3.1, 0.7.0 Jul 10, 2020
@barteksekula
Copy link
Member

If anyone hits issues like this, please check that you have correct entries in web.config:

<location path="externalContentReviews">
        <system.web>
            <authorization>
                <allow roles="ExternalReviewers" />
                <deny users="*" />
            </authorization>
        </system.web>
    </location><location path="EPiServer/advanced-cms.ExternalReviews">
        <system.web>
            <authorization>
                <allow roles="ExternalReviewers, WebEditors, WebAdmins, Administrators" />
                <deny users="*" />
            </authorization>
        </system.web>
    </location>

barteksekula added a commit that referenced this issue Nov 28, 2021
We should also allow regular editors to use External reviews.
We can also reuse the default controller urls provided by cms ui.
i.e. /modulename/controller/action instead of registering custom
urls for external component and review avatars.
Only edit mode users should have access to those anyway.

#202
#167
#74
#53
barteksekula added a commit that referenced this issue Nov 29, 2021
We should also allow regular editors to use External reviews.
We can also reuse the default controller urls provided by cms ui.
i.e. /modulename/controller/action instead of registering custom
urls for external component and review avatars.
Only edit mode users should have access to those anyway.

#202
#167
#74
#53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants