openrightsgroup / blocked-org-uk

Template front-end code, markup, style-sheets, images and other assets for the Censorship Monitoring Project (blocked.org.uk)
https://www.blocked.org.uk/
GNU General Public License v3.0
13 stars 5 forks source link

Migrate from staging to live #44

Closed graphiclunarkid closed 10 years ago

graphiclunarkid commented 10 years ago

This issue is a placeholder for the process of migrating the next release from staging to live.

We should revisit our solution to issue #8 at this time. As we progress we should add to this issue any more things we think we should consider as part of this process.

JimKillock commented 10 years ago

I've done migration of most of the MODX content to live, and Lee has moved the files across. It's not quite working however.

mkillock commented 10 years ago

I'd take a look but I think my access has been revoked

JimKillock commented 10 years ago

ok, should work now

mkillock commented 10 years ago

The url is submitted OK and put into the FormSave table - there is an APIResult to prove successful submission.

The problem is that the [[!FormItRetriever]] call isn't working on the thankyou page - if I hardcode a url into the GetURLhistory snippet, that works. The version of FormIt is the same on dev and live, so I am at a loss as to why this doesn't work?

http://rtfm.modx.com/extras/revo/formit/formit.formitretriever

mkillock commented 10 years ago

If I add a &redirectToOnNotFound='7444' parameter to the FormItRetriever call, submission to the homepage form results in going to page id 7444. According to the above website, this means, quote:

"redirectToOnNotFound If the data is not found and if this is set, redirect to the Resource with this ID."

It's not finding any form data - could this have anything to do with varnish?

JimKillock commented 10 years ago

Could be: we’ll nee to ask Lee about this.

mkillock commented 10 years ago

An possible (insecure?) alternative would be to pass the url to the thanks page via $_GET

But presumably this means that anyone could spam the thanks page with multiple url requests

JimKillock commented 10 years ago

Seems to be a cookie issue. Varnish was preventing cookies from being set. However, we seem to have a second bug. MODX should be setting the cookie as per the domain, but is not. I've adjusted session_cookie_domain to .blocked.org.uk but cookies are being set / sent as .openrightsgroup.org - I've also asked why this might be happening here: http://forums.modx.com/thread/91099/session-cookie-setting-not-doing-anything#dis-post-498818

JimKillock commented 10 years ago

Lee has put in an ugly fix via Varnish while we figure this out.

gwire commented 10 years ago

session_cookie_domain is not working for this sub site. Please continue to investigate, and raise a bug with ModX developers.

Varnish workaround is to intercept pages coming from the backend, checking for the cookie domain is ".openrightgroup.org" and rewriting it to ".blocked.org.uk". This is a short term monkey-patch - not a real fix.

While this issue is being looked at, uou'll be able to check if the rewrite activated as it will preserve the original cookie in a "X-Set-Cookie-Orig" header.

gwire commented 10 years ago

Also note that the Varnish config patch, if still needed, will need to be updated at "go live" as it only checks on requests for new.report.org.uk

webal commented 10 years ago

I've just updated a couple of the images from the repo to the staging server, if they've been copied already they'll need replacing - sorry I'd overlooked this earlier!

JimKillock commented 10 years ago

I'm going to move the cookie bug to a separate ticket as it's very specific. Hope that's ok.

JimKillock commented 10 years ago

@webal if it is just a couple of images then maybe email them to me saying where they are stored?

webal commented 10 years ago

It's the two imgs here: https://github.com/openrightsgroup/blocked-org-uk/tree/master/raw_html/img/layout and they should overwrite the existing ones in site/blocked/assets/imgs - sorry can't remember the exact path as I've nothing set up on the work computer

graphiclunarkid commented 10 years ago

27 needs to be done as part of this migration process.

graphiclunarkid commented 10 years ago

28 is also part of this process

JimKillock commented 10 years ago

Should I move the site across this weekend?

graphiclunarkid commented 10 years ago

On 14 June 2014 14:25:46 CEST, JimKillock notifications@github.com wrote:

Should I move the site across this weekend?


Reply to this email directly or view it on GitHub: https://github.com/openrightsgroup/blocked-org-uk/issues/44#issuecomment-46086508

Yes please. It's ready to go :)

I have a new OpenPGP key: https://richardskingdom.net/new-openpgp-key

https://richardskingdom.net Twitter: @graphiclunarkid

Snet form my phone. Please esxuce bvretiy & tpyos.

JimKillock commented 10 years ago

OK, I think I've moved it across accurately. Most of the scripts hadn't changed AFAICT, the CSS and images plus new page content seemed to be the main thing. There will now be some work to make it more usable for the editors. I will also add the social media info for Twitter cards etc.

graphiclunarkid commented 10 years ago

Perfect. Thanks Jim. If it's ok with you I think we can close this issue now. If there are related tasks you think we should be dealing with we can raise new issues for those.

I have a new OpenPGP key: https://richardskingdom.net/new-openpgp-key

https://richardskingdom.net Twitter: @graphiclunarkid

Snet form my phone. Please esxuce bvretiy & tpyos.