aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/general.yml-example1
-rw-r--r--cpanfile53
-rw-r--r--cpanfile.snapshot16
-rw-r--r--perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMindelo.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FixaMinGata.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Harrogate.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/ZeroTB.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
-rw-r--r--templates/web/base/tokens/confirm_problem.html2
-rw-r--r--templates/web/fixmystreet.com/footer_extra.html3
-rwxr-xr-xtemplates/web/fixmystreet.com/report/_extras_top.html3
-rw-r--r--templates/web/fixmystreet.com/research/survey_link.html3
-rw-r--r--templates/web/fixmystreet.com/tokens/_extras_confirm.html1
-rw-r--r--templates/web/fixmystreet/footer.html3
-rw-r--r--templates/web/fixmystreet/report/display.html2
-rw-r--r--templates/web/stevenage/header.html1
-rw-r--r--templates/web/stevenage/tracking_code.html16
20 files changed, 117 insertions, 11 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example
index 9770ade86..26e12c322 100644
--- a/conf/general.yml-example
+++ b/conf/general.yml-example
@@ -49,7 +49,6 @@ EXAMPLE_PLACES: [ 'High Street', 'Main Street' ]
# An array of languages for the site, in the following format:
# <language code>,<pretty name>,<locale>
-# Do not remove the en-gb line as it is needed for correct operation.
LANGUAGES:
- 'en-gb,English,en_GB'
diff --git a/cpanfile b/cpanfile
index ba92755f9..e6284d6b2 100644
--- a/cpanfile
+++ b/cpanfile
@@ -3,6 +3,10 @@ requires 'List::MoreUtils';
requires 'local::lib';
requires 'Class::Unload';
+# Interesting installation issues, see end of this file
+requires 'ExtUtils::MakeMaker', '6.72'; # [1]
+# requires 'MooseX::NonMoose'; # [2]
+
# Catalyst itself, and modules/plugins used
requires 'Catalyst', '5.80031';
requires 'Catalyst::Action::RenderView';
@@ -129,3 +133,52 @@ requires 'Test::Warn';
requires 'Test::WWW::Mechanize::Catalyst';
requires 'Web::Scraper';
+#################################################################
+#
+# [1] Many things in cpanfile.snapshot require ExtUtils::MakeMaker 6.59, and
+# one thing (DBIx::Class::IntrospectableM2M) requires 6.72, and so the snapshot
+# contains the details for ExtUtils::MakeMaker 6.72. carton itself requires
+# ExtUtils::MakeMaker 6.64.
+#
+# I don't understand the intracacies of carton/cpanm, but from the
+# build.logs, I ascertain that DBIx::Class::Schema::Loader requires
+# DBIx::Class::IntrospectableM2M and somehow in the process sets it up so that
+# DBIx::Class::IntrospectableM2M tries to install the version of
+# ExtUtils::MakeMaker used during the DBIx::Class::Schema::Loader installation.
+#
+# It seems as if the version of ExtUtils::MakeMaker used at any point is the
+# one in local if present, then the one in local-carton if present, then the
+# system one. Let's look at a few different installation platforms:
+#
+# On Debian wheezy, ExtUtils::MakeMaker is version 6.57. The installation of
+# carton installs ExtUtils::MakeMaker 7.04 in local-carton. Running carton
+# install installs ExtUtils::MakeMaker 6.72 in local at some point before
+# DBIx::Class::Schema::Loader (due to one of the 6.59 requirements), and so
+# DBIx::Class::IntrospectableM2M uses and tries to install 6.72, which is fine.
+#
+# On Ubuntu trusty, ExtUtils::MakeMaker is version 6.66. The installation of
+# carton is satisfied already. Running carton install, nothing else upgrades
+# ExtUtils::MakeMaker (as 6.66 > 6.59), and so when we get to
+# DBIx::Class::IntrospectableM2M it uses the system 6.66 and upgrades to 6.72,
+# which is again fine.
+#
+# On Mac OS X 10.9.5, ExtUtils::MakeMaker is version 6.63. The installation of
+# carton installs ExtUtils::MakeMaker 7.04 in local-carton. Running carton
+# install, nothing else upgrades ExtUtils::MakeMaker (as 6.63 > 6.59), and when
+# we get to DBIx::Class::IntrospectableM2M it therefore uses 7.04 and can't
+# install it (as the snapshot only contains 6.72) and fails.
+#
+# Therefore, if we make sure the ExtUtils::MakeMaker from the snapshot is
+# installed early in the process, it will be available when we get to
+# DBIx::Class::IntrospectableM2M, be used and match its own condition.
+# I'm sure this isn't the correct solution, but it is a working one.
+#
+#
+# [2] The installation of Catalyst::Model::DBIC::Schema tries to install any
+# module that it finds already present in an optional section. On a Mac, the
+# system has MooseX::NonMoose version 0.22, which is an optional component for
+# Catalyst::Helper support, and it finds that but then thinks it is not
+# installed, tries to install it but doesn't find it in the snapshot, and
+# fails. The easiest solution here is to include MooseX::NonMoose in
+# cpanfile.snapshot so it can be found, though I guess it shouldn't be trying
+# to install it if it's already thought that 0.22 was installed...
diff --git a/cpanfile.snapshot b/cpanfile.snapshot
index a5859b742..9bade8038 100644
--- a/cpanfile.snapshot
+++ b/cpanfile.snapshot
@@ -4176,6 +4176,22 @@ DISTRIBUTIONS
Test::More 0.88
namespace::autoclean 0
namespace::clean 0.10
+ MooseX-NonMoose-0.26
+ pathname: D/DO/DOY/MooseX-NonMoose-0.26.tar.gz
+ provides:
+ MooseX::NonMoose 0.26
+ MooseX::NonMoose::InsideOut 0.26
+ MooseX::NonMoose::Meta::Role::Class 0.26
+ MooseX::NonMoose::Meta::Role::Constructor 0.26
+ requirements:
+ ExtUtils::MakeMaker 6.30
+ List::MoreUtils 0
+ Module::Runtime 0
+ Moose::Exporter 0
+ Moose::Role 2.0000
+ Moose::Util 0
+ Try::Tiny 0
+ warnings 0
MooseX-Params-Validate-0.18
pathname: D/DR/DROLSKY/MooseX-Params-Validate-0.18.tar.gz
provides:
diff --git a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm b/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
index df4d428e8..58bc6973d 100644
--- a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
+++ b/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
@@ -12,7 +12,7 @@ sub example_places {
return ( 'Dominica, Recoleta', 'Pio Nono' );
}
-sub languages { [ 'es-cl,Castellano,es_CL', 'en-gb,English,en_GB' ] }
+sub languages { [ 'es-cl,Castellano,es_CL' ] }
sub disambiguate_location {
return {
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 7f1fba67a..fea1e4ad1 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -7,6 +7,7 @@ use FixMyStreet;
use FixMyStreet::Geocode::Bing;
use DateTime;
use Encode;
+use List::Util 'none';
use URI;
use Digest::MD5 qw(md5_hex);
@@ -157,7 +158,9 @@ Set the language and domain of the site based on the cobrand and host.
sub set_lang_and_domain {
my ( $self, $lang, $unicode, $dir ) = @_;
- my $languages = join('|', @{$self->languages});
+ my @languages = @{$self->languages};
+ push @languages, 'en-gb,English,en_GB' if none { /en-gb/ } @languages;
+ my $languages = join('|', @languages);
my $lang_override = $self->language_override || $lang;
my $lang_domain = $self->language_domain || 'FixMyStreet';
@@ -174,7 +177,7 @@ sub set_lang_and_domain {
return $set_lang;
}
-sub languages { FixMyStreet->config('LANGUAGES') || [ 'en-gb,English,en_GB' ] }
+sub languages { FixMyStreet->config('LANGUAGES') || [] }
sub language_domain { }
sub language_override { }
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 822a0c43b..34cb2f719 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -12,7 +12,7 @@ sub country {
return 'NO';
}
-sub languages { [ 'en-gb,English,en_GB', 'nb,Norwegian,nb_NO' ] }
+sub languages { [ 'nb,Norwegian,nb_NO' ] }
sub language_override { 'nb' }
sub enter_postcode_text {
diff --git a/perllib/FixMyStreet/Cobrand/FixMindelo.pm b/perllib/FixMyStreet/Cobrand/FixMindelo.pm
index 59debf157..60f69d589 100644
--- a/perllib/FixMyStreet/Cobrand/FixMindelo.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMindelo.pm
@@ -8,7 +8,7 @@ sub country {
return 'CV';
}
-sub languages { [ 'pt-cv,Portuguese,pt_CV', 'en-gb,English,en_GB' ] }
+sub languages { [ 'pt-cv,Portuguese,pt_CV' ] }
sub language_override { 'pt-cv' }
sub disambiguate_location {
diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
index 4101dc5b5..e6e54926f 100644
--- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
+++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
@@ -13,7 +13,7 @@ sub country {
return 'SE';
}
-sub languages { [ 'en-gb,English,en_GB', 'sv,Swedish,sv_SE' ] }
+sub languages { [ 'sv,Swedish,sv_SE' ] }
sub language_override { 'sv' }
sub enter_postcode_text {
diff --git a/perllib/FixMyStreet/Cobrand/Harrogate.pm b/perllib/FixMyStreet/Cobrand/Harrogate.pm
index 6bcc2f227..8c0639ee7 100644
--- a/perllib/FixMyStreet/Cobrand/Harrogate.pm
+++ b/perllib/FixMyStreet/Cobrand/Harrogate.pm
@@ -238,5 +238,9 @@ sub process_additional_metadata_for_email {
$h->{additional_information} = $additional;
}
+sub send_questionnaires {
+ return 0;
+}
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
index cdf4e5ad4..ef1b0b1e1 100644
--- a/perllib/FixMyStreet/Cobrand/ZeroTB.pm
+++ b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
@@ -10,9 +10,6 @@ sub country {
return 'IN';
}
-sub languages { [ 'en-gb,English,en_GB' ] }
-sub language_override { 'en-gb' }
-
sub disambiguate_location {
return {
country => 'in',
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 577da9dd5..074c21edb 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -76,7 +76,7 @@ sub example_places {
return [ 'Langstrasse', 'Basteiplatz' ];
}
-sub languages { [ 'de-ch,Deutsch,de_CH', 'en-gb,English,en_GB' ] }
+sub languages { [ 'de-ch,Deutsch,de_CH' ] }
sub language_override { 'de-ch' }
# If lat/lon are in the URI, we must have zoom as well, otherwise OpenLayers defaults to 0.
diff --git a/templates/web/base/tokens/confirm_problem.html b/templates/web/base/tokens/confirm_problem.html
index 217fb0a72..8c92c874a 100644
--- a/templates/web/base/tokens/confirm_problem.html
+++ b/templates/web/base/tokens/confirm_problem.html
@@ -31,6 +31,8 @@
[% END %]
+[% TRY %][% INCLUDE 'tokens/_extras_confirm.html' %][% CATCH file %][% END %]
+
</div>
[% display_crosssell_advert( problem.user.email, problem.name ) %]
diff --git a/templates/web/fixmystreet.com/footer_extra.html b/templates/web/fixmystreet.com/footer_extra.html
new file mode 100644
index 000000000..ba32a5534
--- /dev/null
+++ b/templates/web/fixmystreet.com/footer_extra.html
@@ -0,0 +1,3 @@
+<script type="text/javascript">
+ (function(){var e=0.6;var t=null;var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" "){i=i.substring(1,i.length)}if(i.indexOf("ms_srv_t=")==0){var t=i.substring("ms_srv_t=".length,i.length)}if(i.indexOf("ms_srv_r=")==0){var s=i.substring("ms_srv_r=".length,i.length)}}if(t==null){if(Math.random()<e){var o=Math.round((new Date).getTime()/1e3);document.cookie="ms_srv_t="+o+"; path=/";document.cookie="ms_srv_r="+document.referrer+"; path=/";t=o;s=document.referrer}else{document.cookie="ms_srv_t=X; path=/";t="X"}}if(t!="X"&&!!document.getElementById("ms_srv_wrapper")){var u=Math.round((new Date).getTime()/1e3)-t;var a=!!document.getElementById("user-meta");var f=document.getElementById("ms_srv_link");data={ms_time:u,ms_referrer:s||null,ms_registered:a,ms_transaction:f.getAttribute("data-transaction")};var l=[];for(var c in data){l.push(encodeURIComponent(c)+"="+encodeURIComponent(data[c]))}f.href=f.href+"?"+l.join("&");document.getElementById("ms_srv_wrapper").style.display=""}})()
+</script>
diff --git a/templates/web/fixmystreet.com/report/_extras_top.html b/templates/web/fixmystreet.com/report/_extras_top.html
new file mode 100755
index 000000000..4938e8749
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/_extras_top.html
@@ -0,0 +1,3 @@
+[% IF created_report %]
+ [% INCLUDE 'research/survey_link.html' %]
+[% END %]
diff --git a/templates/web/fixmystreet.com/research/survey_link.html b/templates/web/fixmystreet.com/research/survey_link.html
new file mode 100644
index 000000000..7357249d8
--- /dev/null
+++ b/templates/web/fixmystreet.com/research/survey_link.html
@@ -0,0 +1,3 @@
+<div id="ms_srv_wrapper" style="display:none">
+ <p><a href="https://www.surveygizmo.co.uk/s3/1907419/FMS-2014" id="ms_srv_link" data-transaction="report">We&rsquo;re running a short survey to help us understand how well FixMyStreet works. If you&rsquo;d like to take it, click here.</a></p>
+</div>
diff --git a/templates/web/fixmystreet.com/tokens/_extras_confirm.html b/templates/web/fixmystreet.com/tokens/_extras_confirm.html
new file mode 100644
index 000000000..c27383f42
--- /dev/null
+++ b/templates/web/fixmystreet.com/tokens/_extras_confirm.html
@@ -0,0 +1 @@
+[% INCLUDE 'research/survey_link.html' %]
diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html
index 71e87ddfb..63b04de83 100644
--- a/templates/web/fixmystreet/footer.html
+++ b/templates/web/fixmystreet/footer.html
@@ -37,5 +37,8 @@
<!-- [% INCLUDE 'debug_footer.html' %] -->
</div> <!-- .wrapper -->
+
+ [% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %]
+
</body>
</html>
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index 91762e022..314b09b28 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -17,6 +17,8 @@
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
[% END %]
+[% TRY %][% INCLUDE 'report/_extras_top.html' %][% CATCH file %][% END %]
+
[% INCLUDE 'report/banner.html' %]
[% INCLUDE 'report/_main.html' %]
diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html
index dbcc37866..0b3171808 100644
--- a/templates/web/stevenage/header.html
+++ b/templates/web/stevenage/header.html
@@ -23,6 +23,7 @@
[% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
[% extra_js %]
+ [% INCLUDE 'tracking_code.html' %]
</head>
<body class="[% bodyclass | html IF bodyclass %]">
diff --git a/templates/web/stevenage/tracking_code.html b/templates/web/stevenage/tracking_code.html
new file mode 100644
index 000000000..e7c2bafd6
--- /dev/null
+++ b/templates/web/stevenage/tracking_code.html
@@ -0,0 +1,16 @@
+[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %]
+
+<script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-21613820-7', 'auto');
+ ga('send', 'pageview');
+
+</script>
+
+[% ELSE %]
+<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" -->
+[% END %]