oecd-opsi / opsi

Custom theme for OPSI website
0 stars 0 forks source link

Case preview links in Innovations tab in user profile go to 404 #8

Closed jlberryhill closed 5 years ago

jlberryhill commented 5 years ago

@conlaccento -- I submitted two test case studies (one from each platform). The links that should go to platform-specific previews of the submitted case studies go to 404 errors.

404

The editing feature is opening cases in the correct submission form, which is great. thanks for fixing that.

conlaccento commented 5 years ago

hi @jlberryhill, they give 404 because pending status is not public, so it can't be displayed in frontend: what we can do is avoid to print a link if the status is not publish. Can this solution work for you?

jlberryhill commented 5 years ago

Hi @conlaccento -- they way is used to work is that a user could click on this link to view a previous of what their case study would look like once it is published (even if the case study is not yet published). This would allow auser to see what the final output would look like in order to determine whether they may want to make edits. So even though it is not fully published, the preview is still accessible to the user who submitted it.

conlaccento commented 5 years ago

Now it should work, can you confirm it?

jlberryhill commented 5 years ago

@conlaccento - I gave it a try. It no longer goes to a 404 page, but it goes to a mostly blank case study page.

testcase

conlaccento commented 5 years ago

Fixed now

jlberryhill commented 5 years ago

Thanks, @conlaccento. This does seem to be working well for some cases, and for some others i get 404. Screenshots below. The only difference I can think of is that I am logged into an Open Gov Admin account for the one that is working, and a regular logged-in (non-admin) account for the one that results in a 404 error. In general, admins should be able to see all cases, and every submitting user should be able to see previers of their cases.

Working for: working

404 for: 404b

conlaccento commented 5 years ago

Hi @jlberryhill, now the previews should work as expected: all visible to opengov admin and previews visible to case owner. Can you confirm it?

jlberryhill commented 5 years ago

Hi @conlaccento -- It stil doesn't seem to be working for non-admin users.

Below is a screenshot for cases I previously submitted with the account "CaseTest" 404v3

It works well when I use the account OpenGovAdmin though.

conlaccento commented 5 years ago

Now everything should work