[Koha] Intranet error after upgrade

2018-01-21 Thread Matthew Charlesworth, S.J.
Hello,

I recently upgraded my library to the following and didn't notice any
errors during the upgrade.

Koha version: 17.11.01.000
   OS version ('uname -a'): Linux ip-172-31-36-26 4.4.0-109-generic
#132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64
   Perl version: 5.022001
MySQL version: mysql Ver 15.1 Distrib 10.0.33-MariaDB, for debian-linux-gnu
(x86_64) using readline 5.2
   Apache version: Server version: Apache/2.4.18 (Ubuntu)
   Memcached: Servers: undefined
   Zebra version: Zebra 2.0.59

However, when I tried to access the Intranet (https://library.sj.org.za:8080)
Chrome gives an 'Err empty response'. I tried it in Safari and got a
similar message. But I can see the OPAC (https://library.sj.org.za/) just
fine.

On the localhost I can access the Intranet (using lynx), which made me
think perhaps the problem is with Apache to the outside? But Apache is
running. I looked in the error logs and found:

tail /var/log/apache2/error.log
[Sat Jan 20 06:26:11.494741 2018] [mpm_prefork:notice] [pid 8277] AH00163:
Apache/2.4.18 (Ubuntu) mpm-itk/2.4.7-04 OpenSSL/1.0.2g configured --
resuming normal operations
[Sat Jan 20 06:26:11.494755 2018] [core:notice] [pid 8277] AH00094: Command
line: '/usr/sbin/apache2'
[Sat Jan 20 06:26:11.714372 2018] [mpm_prefork:notice] [pid 8277] AH00171:
Graceful restart requested, doing restart
[Sat Jan 20 06:26:11.720326 2018] [core:warn] [pid 8277] AH00111: Config
variable ${instance} is not defined
[Sat Jan 20 06:26:11.720339 2018] [core:warn] [pid 8277] AH00111: Config
variable ${instance} is not defined
[Sat Jan 20 06:26:11.724453 2018] [mpm_prefork:notice] [pid 8277] AH00163:
Apache/2.4.18 (Ubuntu) mpm-itk/2.4.7-04 OpenSSL/1.0.2g configured --
resuming normal operations
[Sat Jan 20 06:26:11.724460 2018] [core:notice] [pid 8277] AH00094: Command
line: '/usr/sbin/apache2'

My vhost configuration for the Intranet is:


   Include /etc/koha/apache-shared.conf
   Include /etc/koha/apache-shared-intranet.conf

   ServerName library.sj.org.za
   SetEnv KOHA_CONF "/etc/koha/sites/library/koha-conf.xml"
   SetEnv MEMCACHED_SERVERS ""
   SetEnv MEMCACHED_NAMESPACE ""
   AssignUserID library-koha library-koha

   ErrorLog/var/log/koha/library/intranet-error.log
#  TransferLog /var/log/koha/library/intranet-access.log
#  RewriteLog  /var/log/koha/library/intranet-rewrite.log

ScriptAlias /coverflow.pl "/var/lib/koha/library/plugins/Koha
/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl"
Alias /plugin "/var/lib/koha/library/plugins"
# The stanza below is needed for Apache 2.4+

  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted


SSLCertificateFile /etc/letsencrypt/live/library.sj.org.za/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/library.sj.org.za/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName library.sj.org.za
SSLCertificateChainFile /etc/letsencrypt/live/library.sj.org.za/chain.pem


I'm running this on an Amazon EC2 instance. Has anyone any ideas on why it
would just stop working after a routine sudo apt-get upgrade ?

I'd be grateful for any hints or help.

Matthew
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Screenshots internationalization for the manual (and acceptance tests?)

2018-01-21 Thread Eric Bégin

Good morning all !

For me, having the screenshots in the correct language is quite important.

However, having the screenshots updated every release is not necessary.  
For example, I don't mind if there is a slight difference in the 
screenshot when that difference is not related to the explained feature.


Don't get me wrong, I love the idea of automating the screenshots and 
the possibilities it offers, but I believe that a lot of them will need 
to be edited afterward in order to be cropped, added overlay, and so on, 
which make the automation less appealing.  I also think that it will be 
a nightmare to maintain in the long run and making the documentation 
process even harder.


The option is to generate the screenshots when we can.  Its a long 
process at first, but any body are able to take a screenshot, without 
having to code anything, which is, in my opinion, a big advantage.


My 164 Satochis ($0.02) on this sunday morning :)

Eric

On 2018-01-19 11:29, Jonathan Druart wrote:

Hello everybody,

I have spent (too much) time trying to automatically generate the
screenshots of the manual.
The idea behind that was multiple: keep the screenshots up-to-date from one
version of Koha to the others, and generate screenshots in each language of
the manual.
I was really excited after the first half hour when I successfully took my
first screenshot with only few lines of code.
But after a couple of days I realize that the task is very huge: we have
more than 1300 images in the manual, and I have generated only 68 so far.

First I need to know how important is that for you. Will it really change
our lives to have screenshots translated in other languages (and kept in
sync with the interface)? How important is the value added?
One thing is sure: if someone wants to translate screenshots, they should
do it in a generic way so all languages can take advantage of it.

The hidden added value of such mechanism is to add a huge test coverage: we
are going to make sure the screenshots can be generated in several
languages, catching issues we do not cover in our test suites, etc.
A bit of technique: the screenshots are taken using Selenium tests (which
we already use a bit in the test suites): it simulates a user's interaction
with the interface.

The big problem is that, for now, only developers could help me.
But do not stop reading now please :)

The code looks like that:
C4::Context->set_preference('SpecifyReturnDate', 1);
$driver->get($base_url.'circ/returns.pl');
screenshot("SpecifyReturnDate", { class => "yui-u first" });
For the "SpecifyReturnDate" screenshot, we set the syspref to 1, hit
returns.pl and create a screenshot from the element with a class "yui-u
first" (yes the element should have an id).
As you can imagine this one is part of the easiest ones.

Now imagine "FineNotifyAtCheckin", we want to capture the alert box when
the patron has fines and returns an item.
The code is:
C4::Context->set_preference('FineNotifyAtCheckin', 1);
my $b = Koha::Items->find(74)->barcode;
issue( $patron, $b );
Koha::Account::Line->new({ borrowernumber => $patron->borrowernumber,
accountno => 1, amountoutstanding => 5 })->store;
checkin( $b );
screenshot("FineNotifyAtCheckin", { class => "dialog alert" } );
Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber
})->delete;
First I assume I have an item with itemnumber=74 that can be issued by a
given patron. I check it out and create a fine of 5. I check the item in
and tadaaa I can take the screenshot for the alert dialog. Then I clean up.

And trust me, this is not the hardest.

So what I suggest is that, if (and only if) people are very interested in
contributing to translate the screenshots and in the concept of having the
whole interface tested, we could offer an easy way to contribute to this
project.

We could do that using Cucumber (see also bug 13849), and let people write
something much more readable (by anybody), like:
Scenario: Take a screenshot for SpecifyReturnDate
Given I have set the syspref SpecifyReturnDate to 1
And I hit the circ/returns.pl
Then I take a screenshot of the element with the class "yui-u first"

Or:
Scenario: Take a screenshot for FineNotifyAtCheckin
Given I have set the syspref FineNotifyAtCheckin to 1
And I checked an item out to a patron
And I added a fine of 5 to the patron
And I checked the item in
Then I take a screenshot of the element with the class "dialog alert"

Does it seem more readable?

Let me know what do you think of that and if you are willing to help.
Then I will see if I can dedicate more time to this project.

Cheers,
Jonathan

Additional information:
- For now only sample data from "en" are used. Part of the interface is not
translated yet (item types, authorised values, framework, etc.)
- The process does not finish for "fr" because of bug 20043
- I have already found several bugs (not reported yet) writing these tests.
- The screenshots I generated are from the installer (all of them) and the