EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10404


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] EPrints 3.4.7 - Repository fails to initialize: "Can't use an undefined value as an ARRAY reference" at Language.pm line 104


CAUTION: This e-mail originated outside the University of Southampton.

Hi David,

thank you for your immediate and immediatly helpful clarifications. I
have been running in circles for quite some time. Your help is greatly
apriciated.
Best Regards,
h.h.


Am 06.08.2026 15:13, schrieb David R Newman:
Hi Herbert,

To follow up, the original archive you created that does not have the
$c->{flavour} set appropriately, will be what causes the error message
when you try to create another archive.  If you edit that archive's
cfg/cfg.d/00_flavour.pl to set this to:

$c->{flavour} = 'pub';

Then that should fix the initial error message.  Also check through
the rest of the archive's cfg/cfg.d/ directory to make
sure $c->{flavour} is not defined elsewhere.  (You seem to intimate
that this is also set in 10_core.pl).

You may also need to manual copy over all the files from
flavour/pub_lib/defaultcfg/.  There should only be 9 files and several
are either not directly needed to get the archive running or will not
make a significant difference if not present under your archive's cfg/
directory.

I would copy cfg.d/citationcaches.pl, cfg.d/csrf_protection.pl and
cfg/lang/en/phrase/zz_webcfg.xml.  You may also need sitelogo.gif if
you have not already applied branding to you archive.  With
cfg.d/csrf_protection.pl, I would advise modifying the version in your
archive by setting a random value for $c->{csrf_token_salt}.

lang/en/phrases/local.xml, static/style/auto/zzz_local.css, and
static/javascript/auto/80_local.js may also be useful.  As they are
the best places to add random phrases, CSS or Javascript, when you are
editing the configuration from the command line.

Regards

David Newman

On 06/08/2026 13:40, David R Newman wrote:
Hi Herbert,

The command you should run for creating a new repository archive on
3.4 is:

EPRINTS_PATH/bin/epadmin create FLAVOUR_ID

I think you are specifying what you want to be the archive's ID to be
rather than the flavour you want.  So on a stand installation your
create command should be the following for a Research Publications
(typical standard) EPrints repository archive:

/opt/eprints3/bin/epadmin create pub

This should do to main things when building your archive:

Create EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/00_flavour.pl and
set its contents to:

$c->{flavour} = 'pub';

It should also copy all the files under
EPRINTS_PATH/flavours/pub_lib/defaultcfg/ to the equivalent places
under EPRINTS_PATH/archives/ARCHIVE_ID/cfg/.

I would advise completely removing the archive you partial created.
If necessary just move it out of EPRINT_PATH/archives/. Then make sure
the database and the database user created for it are dropped from
MySQL.  You should then be able to create an archive with the same ID
and database credentials as before but using the epadmin create
command described earlier.

I will look into updating
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FGetting_Started%23Creating_the_Archive&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573712671%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=4C0S8Gn2I%2B5jWUV4qj16uduaqA%2BiYIGHvs1xd3U4gNU%3D&reserved=0 to
make it clearer what the parts of this command mean.  I think if you
just look at the command (which is the most prominent part of that
section) it  just has "pub", which could be interpreted as an archive
ID rather than a flavour.  It is only if you read well into the
paragraph below does it make it clear that this in the parameter is
for the flavour.

Regards

David Newman

On 06/08/2026 12:32, Herbert Hrachovec wrote:

CAUTION: This e-mail originated outside the University of
Southampton.

CAUTION: This e-mail originated outside the University of
Southampton.

Dear EPrints-Team,

I'm setting up EPrints 3.4.7 on Ubuntu 24.04. The static pages load,
but
any CGI script or Perl command that tries to initialize a repository
fails with:

"Can't use an undefined value as an ARRAY reference at
/opt/eprints3/perl_lib/EPrints/Language.pm line 104."

What I've tried:

    Created a fresh test repository (epadmin create testrepo) - same
error

    Verified /opt/eprints3/flavours/pub_lib/ exists

    Added $c->{flavours} configuration to both 00_flavour.pl and
10_core.pl

    Copied language files from a working installation

    Confirmed permissions are correct (eprints:eprints)

What works:

    The static HTML pages load fine

    epadmin test sammelpunkt --verbose passes

    Apache serves the static content

What doesn't work:

    perl -I/opt/eprints3/perl_lib -e 'use EPrints; my $repo =
EPrints::Repository->new( id => "testrepro" );' fails with the same
error

    All CGI scripts return 500 Internal Server Error

The error seems to be in the Language module:
At line 104 of Language.pm, it tries to access @{
$repository->get_conf("flavours")->{$flavour} } but
$repository->get_conf("flavours") is returning undef.

Questions:

    Is there a global configuration file that defines flavours that
I'm
missing?

    Could the flavours configuration be loaded from a different
location
than /opt/eprints3/flavours/?

    Is there a known issue with EPrints 3.4.7 on Ubuntu 24.04?

Thank you for your help!

h.h.

*** Options: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEprints-tech_Mailing_List&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573756537%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=gVJe00LH4H2F99z4Ih89Ic3rWi8007YALI29r2moTaU%3D&reserved=0
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573779506%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=jTRn0qYgVkhZX9%2B2SUFJeaO1hd%2BmocL5%2BuH7eTzDRd4%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573802533%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=Hn3%2Bf2tf0WzdQQgvqEe3BOHxvs8T1SWqFzN%2Bk%2FqdRg4%3D&reserved=0


*** Options: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEprints-tech_Mailing_List&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573829361%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=O9FBW2Yz8xYChz2ovlJYqTXwZPWI0xnrLKVu9%2Bwg%2FW0%3D&reserved=0
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573870341%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=gs77mCcQsAv6UaGmpM1%2F7zhF8aTFWGFj6jkHygfZZlg%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573911130%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=vDvRf1lO0hEC2zGoOfSprNq9nZS25uL%2FmzSScSwSt2c%3D&reserved=0


*** Options: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEprints-tech_Mailing_List&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573942628%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=gLbbDUCpkHkP33o5AzWNMR88pR7%2B3f9OtLEbSAV%2FhtA%3D&reserved=0
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346573974947%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=9QovtI9u30eGJSkKWEYUWNJ7kkIoe2bWfHAn9z6UFZA%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C35bf095fb383478e5a6508def3e15ba2%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216346574010497%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=eYtVwouYTm9kfkDFwuixoKmrLidP3z%2BY%2FfrX5vEd0S8%3D&reserved=0