EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10403
< 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
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: 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
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Thu, 6 Aug 2026 14:13:34 +0100
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_IDI 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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180839838%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Gk%2BgJDPk7ZB8wcZzLGR1HBgMcRYhKximCTBqnZwmRSI%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180876510%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=TDtwWyAmokfW7%2F%2BIc%2F5JkmasYGf4mdigzTSKIUanaVA%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180892717%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=mPM4YBOku2BFNWwKovxArmhwuI5z86dC6pGKgimC248%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180905695%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=JPmGvRlebwnhmjSjNdJSvcGUTNwS%2FFx51XS2gdm%2BDlc%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180918385%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=8pGtq3jYTZTJn%2B2oPedWy46G14UqY9rMnue156%2BuneQ%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180931052%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=o%2B5lZ%2Fg7f0e9RTnEVgbJfDf%2Bd6YZ3f9hFs%2BE6z3OgQw%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%7C20843fb65eea443f511008def3bc8538%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C639216188180943494%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZW9qwyAYuJdmA%2BbguC0dMvWx5y9v1I%2FQqjfSNALk%2F4M%3D&reserved=0
- Follow-Ups:
- 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
- From: Herbert Hrachovec <herbert.hrachovec@univie.ac.at>
- 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
- References:
- [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
- From: Herbert Hrachovec <herbert.hrachovec@univie.ac.at>
- 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
- From: David R Newman <drn@ecs.soton.ac.uk>
- [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
- Prev by Date: 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
- Next by Date: 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
- Previous by thread: 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
- Next by thread: 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
- Index(es):
