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

Fix "View on website" link for non-editioned topical events and get involved content #2469

Merged
merged 2 commits into from Feb 18, 2016

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Feb 17, 2016

When clicking “View on website” for classifications it shows the whitehall admin rendered version of it.

Viewing a topical event page from whitehall-admin. … means the relative link to its about page also points to whitehall-admin, however that is now served by government front-end and this route errors.

It's a similar story for get involved/take part pages.

Classification and get involved changes go live immediately. Instead send users to the public host with a cache bust query parameter.

This will continue to be a problem as we migrate more formats. A story to solve this more completely is being added to the Core backlog.

Unblocks deploy of:
https://trello.com/c/H8mRXMTV/268-3-topical-event-about-page-migration-final-tasks-for-each-format-deploy-2-medium

fofr added 2 commits Feb 17, 2016
When clicking “View on website” for classifications it shows the
whitehall admin rendered version of it.

Viewing a topical event page from `whitehall-admin. …` means the
relative link to its about page also points to `whitehall-admin`,
however that is now served by government front-end and this route
errors.

Classification changes go live immediately. Instead send users to the
public host with a cache bust query parameter.

Create a separate `public_classification_url` helper so as not to
interfere with:
* atom feed generation
* symmetry between existing helpers and topic_url/topical_event_url
To reduce the chance of users running into a page served by
`whitehall-admin` that has subsequently been migrated to
`government-frontend`, point classification and get involved “View
website” links to the public host with a cache bust parameter.
@benlovell
Copy link
Contributor

@benlovell benlovell commented Feb 17, 2016

LGTM 🚀

@boffbowsh
Copy link
Contributor

@boffbowsh boffbowsh commented Feb 17, 2016

This is a good short term fix 👍. I think the more complex fix should involve changes to make Whitehall.url_maker.public_document_path and friends aware of the new stack.

@jamiecobbett
Copy link
Contributor

@jamiecobbett jamiecobbett commented Feb 18, 2016

@boffbowsh agreed. I think having the rendering_app consistently defined on the model and pulling it from there would be a good idea.

fofr added a commit that referenced this pull request Feb 18, 2016
Fix "View on website" link for non-editioned topical events and get involved content
@fofr fofr merged commit c1b69c1 into master Feb 18, 2016
1 check passed
1 check passed
default Build #7514 succeeded on Jenkins
Details
@fofr fofr deleted the fix-topical-event-link branch Feb 18, 2016
fofr added a commit that referenced this pull request Mar 22, 2016
Whitehall will no longer be serving these pages, so the “View
announcement on GOV.UK” should no longer be a relative URL.

Use the public_and_cachebusted_url_options setup for a similar problem
in #2469
fofr added a commit that referenced this pull request Mar 22, 2016
Whitehall will no longer be serving these pages, so the “View
announcement on GOV.UK” should no longer be a relative URL.

Use the public_and_cachebusted_url_options setup for a similar problem
in #2469
fofr added a commit that referenced this pull request Mar 29, 2016
Whitehall will no longer be serving these pages, so the “View
announcement on GOV.UK” should no longer be a relative URL.

Use the public_and_cachebusted_url_options setup for a similar problem
in #2469
mgrassotti pushed a commit that referenced this pull request Mar 30, 2016
…ls which are not inheriting from Edition.

These links allow editors to see the page on the live site. These pages will not be rendered by Whitehall anymore, but from Government Frontend instead, so the simple path has been substituted by the full url path, as already done here: #2469.

The first list of non-editioned formats has been grab from here:
https://docs.google.com/spreadsheets/d/17jmUukUhb-bg3L-Kspvtogo-4eEek3IVk_qxRA1r3D0/edit#gid=0
gpeng added a commit that referenced this pull request Mar 31, 2016
Whitehall will no longer be serving these pages, so the “View
announcement on GOV.UK” should no longer be a relative URL.

Use the public_and_cachebusted_url_options setup for a similar problem
in #2469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.