Feature #14561

Donation: Fix existing "referrers" (hashes)

Added by Anonymous 2017-08-30 10:54:48 . Updated 2017-10-17 15:46:37 .

Status:
Resolved
Priority:
High
Assignee:
Category:
Fundraising
Target version:
Start date:
2017-08-30
Due date:
% Done:

90%

Feature Branch:
master
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

for the analysis: check how to verify people’s referrers (hashes, etc.), as this did not work last year


Subtasks


Related issues

Related to Tails - Feature #14872: Use Matomo to analyze the 2017 donation campaign Resolved 2017-10-20

History

#1 Updated by BitingBird 2017-08-30 11:19:49

  • Target version set to 2017

#2 Updated by Anonymous 2017-09-18 10:55:47

  • Priority changed from Normal to Elevated
  • Target version changed from 2017 to Tails_3.3

#3 Updated by Anonymous 2017-09-20 10:34:33

OK, so this is actually quite easy:

  • things behind # stay client side and are not sent to the server
  • ? could precede - but this is often used for parameters in search or other queries
  • + could also precede and on many websites this works but the funny thing is that ikiwiki seems to interpret the plus sign and gives me a 404.

So I guess we need to do something like /donate?canceled or whatever we want to track.

#4 Updated by Anonymous 2017-09-20 10:35:37

  • Subject changed from Donation: research on referrers to Donation: Fix existing "referrers" (hashes)
  • Type of work changed from Research to Code

Let’s fix this!

#5 Updated by Anonymous 2017-09-20 10:42:51

  • Assignee set to sajolida
  • QA Check set to Ready for QA
  • Feature Branch set to 451f:tails/feature/14561+fix_hashes

I fixed this in all the files which currenly use this feature except in the old news of version releases because I think this is not necessary. Please review and merge.

#6 Updated by Anonymous 2017-09-20 10:43:08

  • Status changed from Confirmed to In Progress

#7 Updated by intrigeri 2017-09-20 12:19:12

> * + could also precede and on many websites this works but the funny thing is that ikiwiki seems to interpret the plus sign and gives me a 404.

FTR as long as the client is not explicitly talking to ikiwiki.cgi, ikiwiki is not involved, so I guess Apache is looking for a file called the way you asked, including the “+” for some (good or bad) reason.

#8 Updated by Anonymous 2017-10-05 13:03:33

  • Priority changed from Elevated to High

I would need this to be reviewed and merged before october 15th. Do you think you can do it? Otherwise should I assign this to the Foundations team?

#9 Updated by sajolida 2017-10-06 18:25:55

  • Assignee deleted (sajolida)
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch changed from 451f:tails/feature/14561+fix_hashes to feature/14561+fix_hashes

I also thought that using a query string was the way to go!

I changed the scheme to work better with Piwik in the future. See 8e07720c59.

I fixed some other references automatically, most of all to avoid having to fix translations manually. See 43ad0197d8 and 8f51190d54.

One last URL that needs to be fixed is the one we have in the Schleuder footer of tails-bugs. See <del><a class='issue tracker-2 status-3 priority-4 priority-default closed child' href='/code/issues/11726' title='Have a footer on tails-bugs inviting to donate’>Feature #11726. You should write root@boum.org to change it to:

Our help desk is helping hundreds of Tails users each month.
Each user request costs us $6 on average to process.

If you find it useful, please consider donating to Tails so we
can help more people like you:

https://tails.boum.org/donate?r=help

Without additional ‘—’ on top because Schleuder adds this automatically.

Once this branch is merged (hopefully before the start of the campaign) it would be good to test it in the logs of the web server. You should check if you have access to them (internal.git:stats/logs/retrieve-logs.rb) and otherwise I can do that.

#10 Updated by Anonymous 2017-10-09 15:13:30

sajolida wrote:
> I also thought that using a query string was the way to go!
>
> I changed the scheme to work better with Piwik in the future. See 8e07720c59.

Cool, thanks!

> I fixed some other references automatically, most of all to avoid having to fix translations manually. See 43ad0197d8 and 8f51190d54.

Ok.

> One last URL that needs to be fixed is the one we have in the Schleuder footer of tails-bugs. See <del><a class='issue tracker-2 status-3 priority-4 priority-default closed child' href='/code/issues/11726' title='Have a footer on tails-bugs inviting to donate’>Feature #11726. You should write root@boum.org to change it to:

I’ve sent this email and will track the answer.

> Once this branch is merged (hopefully before the start of the campaign) it would be good to test it in the logs of the web server. You should check if you have access to them (internal.git:stats/logs/retrieve-logs.rb) and otherwise I can do that.

I will try that.

#11 Updated by Anonymous 2017-10-09 15:22:40

  • Priority changed from High to Normal

I merged this now. But I’m leaving the “Dev needed” status until

- i know that the email issue has been solved
- the logs show the referrers (although i do not doubt this)

#12 Updated by intrigeri 2017-10-10 06:20:47

  • Priority changed from Normal to High

FTR tons of PO files are currently broken: they have unescaped double quotes in msgid and msgstr. Due to this I can’t build the website locally. I believe this problem was introduced with this branch, so I’m setting priority back to high. I think commit:902a8d9540f32aaef5ea175d7bb81e9943381df9 is the culprit. Sorry if I’m not reporting this problem on the correct ticket / to the right person.

#13 Updated by Anonymous 2017-10-10 09:15:45

  • Assignee set to sajolida

Ouch!

So, I see in the po files for example:

msgid "<a href="https://tails.boum.org/donate?r=home">Donate</a>"

which should be

msgid "<a href=\"https://tails.boum.org/donate?r=home\">Donate</a>"

I’m really bad at using sed.. but it should be simple to fix for sajolida I guess. I can try, but I’m reassigning this to sajolida in the meantime so he knows about it.

#14 Updated by Anonymous 2017-10-10 10:35:21

I fixed the unescaped links. But I think in our replacement there was more wrong, because the places where “donate” links exists are not translated anymore.

#15 Updated by Anonymous 2017-10-10 12:49:11

  • Assignee deleted (sajolida)

sajolida pushed some more changes.

I realized that the sidebar donation buttons are not localized anymore right now. I will fix this tomorrow.

#16 Updated by Anonymous 2017-10-11 14:23:27

u wrote:
> sajolida pushed some more changes.
>
> I realized that the sidebar donation buttons are not localized anymore right now. I will fix this tomorrow.

Nope, did not manage to do it today. Would be glad about help on this one.

#17 Updated by Anonymous 2017-10-12 13:44:40

Actually, there are two issues:

  1. the buttons are not translated anymore.
  2. when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.

#18 Updated by intrigeri 2017-10-14 06:29:00

> Nope, did not manage to do it today. Would be glad about help on this one.

I can give it a try on Monday or Tuesday; there are greater chances this happens if you reassign this ticket to me in the meantime.

#19 Updated by intrigeri 2017-10-16 05:07:39

u wrote:
> Actually, there are two issues:
>
> # the buttons are not translated anymore.

I could not find where this bug appears. Happy to give a hand once this is clarified :)

> # when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.

Right. I’ll explain a bit. Before we merged this branch, the links were generated by ikiwiki, that points to the version of the destination page in the same version as the source one (po_link_to = current), which worked regardless of the browser configuration. But now we have hardcoded links to https://tails.boum.org/donate?r=contribute in the msgstr:s, so there are two cases:

  • Browser that prefers pages in some language that’s not English: thankfully, we also have Apache language negotiation so even such hardcoded links result in the correct, localized page to be displayed in this case.
  • Browser that prefers pages in English (e.g. Tor Browser in Tails, Tor Browser configured to do so when first prompted): as you noticed, the English version of our donate page is always displayed.

So indeed, as you’ve correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

#20 Updated by Anonymous 2017-10-16 13:20:36

  • Assignee set to intrigeri

intrigeri wrote:
> u wrote:
> > # the buttons are not translated anymore.
> I could not find where this bug appears. Happy to give a hand once this is clarified :)

Suddenly, they are translated again. I was talking for example about the “Donate” button in the sidebar.

> > # when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.
>
> Right. I’ll explain a bit. Before we merged this branch, the links were generated by ikiwiki, that points to the version of the destination page in the same version as the source one (po_link_to = current), which worked regardless of the browser configuration. But now we have hardcoded links to https://tails.boum.org/donate?r=contribute in the msgstr:s, so there are two cases:
>
> * Browser that prefers pages in some language that’s not English: thankfully, we also have Apache language negotiation so even such hardcoded links result in the correct, localized page to be displayed in this case.
> * Browser that prefers pages in English (e.g. Tor Browser in Tails, Tor Browser configured to do so when first prompted): as you noticed, the English version of our donate page is always displayed.

Ah, interesting. So i saw the English one probably because of my browser configuration.

> So indeed, as you’ve correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

I would indeed like some help with this - if you think there is an easy way to do it using regexps, for example.

#21 Updated by intrigeri 2017-10-16 14:28:26

>> So indeed, as you’ve correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

> I would indeed like some help with this - if you think there is an easy way to do it using regexps, for example.

I don’t think it’s easy to do that with regexps (that’s multiline, highly context dependent stuff), but I’ll give it a try, probably using a much too broad regexp and picking only the correct changes with git add -p.

#22 Updated by Anonymous 2017-10-16 14:57:50

  • blocks #14557 added

#23 Updated by intrigeri 2017-10-16 17:02:50

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:bf19ab69ff29eac07cdee98ab3e7482318454c82.

#24 Updated by intrigeri 2017-10-16 17:25:25

  • Status changed from Resolved to In Progress
  • Assignee deleted (intrigeri)
  • % Done changed from 100 to 90
  • QA Check changed from Dev Needed to Ready for QA

Ooops, I’ve closed this too fast. Please review and check this works as intended :)

#25 Updated by intrigeri 2017-10-16 17:25:51

  • Feature Branch changed from feature/14561+fix_hashes to master

(on the master branch)

#26 Updated by Anonymous 2017-10-17 15:46:38

  • Status changed from In Progress to Resolved
  • QA Check changed from Ready for QA to Pass

awesome, thank you very much!

#27 Updated by sajolida 2017-10-20 17:07:23

  • related to Feature #14872: Use Matomo to analyze the 2017 donation campaign added