500 | Internal Server Error | sfException The "i18n" object does not exist in the current context.

164 views
Skip to first unread message

Anthony Sheehy

unread,
Mar 24, 2020, 12:30:16 PM3/24/20
to AtoM Users
Upgrading from 2.5.2 to 2.5.3 and I am getting the following error noted above. Multiple attempts, same outcome.

Ubuntu 16.04, 8Gb Memory all up to date.

Copied the old directory with it's data to separate directory. 
Backed up the database. 
Removed Percona Server 5.6 and installed mysql-server-5.7
Created blank new database (didn't need to drop as it disappeared with 5.6) with encoding and collate as specified, added user 'atom'.
Added the new mysqld.cnf file to /etc/mysql/conf.d
Restarted mysql service
Extracted the tar to /usr/share/nginx/atom
Opened web page.
Clicked continue
Entered the database and user details - next
No change on the next page, next. 
Then bang: 500 Error base the "i18n" object does not exist in the current context.

So... 

Tried running php symfony tools:purge, restart php-fpm drop and re-create DB - nyada... same error no useful information.

What next?



Dan Gillean

unread,
Mar 24, 2020, 2:02:43 PM3/24/20
to ICA-AtoM Users
Hi Anthony, 

One of our developers found an older issue ticket that seems very similar. It recommends trying the following:

It was found that if a user encounters this error, they can work around by:
- restart fpm (sudo systemctl restart php7.0-fpm <-- in the case of Ubuntu 16.04)
- restart the install (dump and recreate db, delete and set up the atom application folder again)
- the install will now proceed cleanly.

If the user just tries again without restarting fpm, they will repeatedly run into the same error during install.

If you are using PHP 7.2, the command to restart it would be: 
  • sudo systemctl restart php7.2-fpm
Please give this a try and let us know if it helps. If so, I'll file a new ticket so we can investigate what's causing this, and what we might do to resolve it. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/ca93a5a8-08c9-46ff-b3fb-78dd25be7974%40googlegroups.com.

Anthony Sheehy

unread,
Mar 25, 2020, 5:46:16 AM3/25/20
to AtoM Users
Hi Dan,

No difference. 

500 | Internal Server Error | sfException

The "i18n" object does not exist in the current context.

stack trace

  • at ()
    in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 500 ...
      1.   {
      2.     if (!$this->has($name))
      3.     {
      4.       throw new sfException(sprintf('The "%s" object does not exist in the current context.'$name));
      5.     }
      6.     return $this->factories[$name];
  • at sfContext->get('i18n')
    in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 616 ...
      1.   public function __get($name)
      2.   {
      3.     return $this->get($name);
      4.   }
      5.   public function __set($name$value)
  • at sfContext->__get('i18n')
    in SF_ROOT_DIR/plugins/sfInstallPlugin/lib/sfInstall.class.php line 495 ...
      1.     $setting->setValue(serialize($premisAccessRightValues), array('sourceCulture' => true));
      2.     $setting->save();
      3.     $accessDisallowWarning sfContext::getInstance()->i18n->__('Access to this record is restricted because it contains personal or confidential information. Please contact the Reference Archivist for more information on accessing this record.');
      4.     $accessConditionalWarning sfContext::getInstance()->i18n->__('This record has not yet been reviewed for personal or confidential information. Please contact the Reference Archivist to request access and initiate an access review.');
      5.     foreach (QubitTaxonomy::getTermsById(QubitTaxonomy::RIGHT_BASIS_ID) as $item)
      6.     {
  • at sfInstall::loadData()
    in SF_ROOT_DIR/plugins/sfInstallPlugin/modules/sfInstallPlugin/templates/loadDataSuccess.php line 5 ...
      1. <?php sfInstall::insertSql() ?>
      2. <?php sfInstall::loadData() ?>
      3. <?php sfInstall::populateSearchIndex() ?>
Regards


Anthony

Dan Gillean

unread,
Mar 25, 2020, 2:19:09 PM3/25/20
to ICA-AtoM Users
Hi Anthony, 

I've asked one of our developers to take a closer look. In the meantime, I found two older similar threads, which were both resolved by increasing the available memory: 
How much memory does your installation currently have available, and are you able to increase this, even if just to complete the installation?

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

Anthony Sheehy

unread,
Mar 26, 2020, 4:26:17 AM3/26/20
to AtoM Users
Hi Dan,

I saw those and put the memory up to 8Gb. The prerequisites now say 7Gb yes? Going to see if I have time today to do a complete server wipe and reinstall. 

Regards


Anthony
To unsubscribe from this group and stop receiving emails from it, send an email to ica-ato...@googlegroups.com.

Dan Gillean

unread,
Mar 26, 2020, 10:20:17 AM3/26/20
to ICA-AtoM Users
Hi Anthony, 

Sorry about that; I realize now that you mentioned the 8GB in your first message. 

I suspect that a wipe and reinstall will probably solve your issues - our developers suspect that either there's still some caching going on from the previous installation, or the PHP execution limits in the PHP-FPM pool set up during installation are not allowing enough of the available memory to be used. A wipe should resolve caching issues - in addition to PHP-FPM's cache, it's possible some of the old config files are being cached, or else Symfony's cache (clear with php symfony cc) or Memcached (sudo systemctl restart memcached) could be interfering as well. 

You could also try increasing the php_admin_value[memory_limit] value in the PHP pool we set up during installation, to see if that helps. 

Let us know how it goes! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/2812f35a-fdea-4870-956d-cd6b99e0f0bb%40googlegroups.com.

Anthony Sheehy

unread,
Mar 26, 2020, 10:21:29 AM3/26/20
to AtoM Users
I think I want to cry now. A complete fresh installation of Ubuntu 18.04 and everything by the book, and it still errors out with the same rubbish error.

Not a happy bunny.

Dan Gillean

unread,
Mar 26, 2020, 11:55:18 AM3/26/20
to ICA-AtoM Users
Hi Anthony, 

I'm so sorry this is still happening! 

I fully expected that a fresh installation would resolve this. The only other thought one of our developers had was that it might be related to permissions - that someone the YAML config files can't be created inside the AtoM folder. 

You can always try resetting the filesystem permissions with: 
  • sudo chown -R www-data:www-data /usr/share/nginx/atom
Here is the issue ticket from which I took the PHP-FPM restart suggestion - you may find more useful contextual information here: 
It also looks like we sent our last emails right around the same time, so be sure to check out the suggestions in my last message, in case they help. 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/ca56b2ee-9aa2-4524-832e-d4917d086e8a%40googlegroups.com.

Anthony Sheehy

unread,
Mar 26, 2020, 1:35:07 PM3/26/20
to AtoM Users
I had hoped that too! Major head scratching. The permission are correct (otherwise you don't even get the Web Installation) ... well I say correct - I followed the instruction that follows un-taring the installation into the atom folder. I skipped over saying that I set the permissions in my first post - but I do... every time (except the time when the web installation page did not appear... which is why I know they were set - I forgot that one time and I know what happens.)

I think your future suggestion of doing all of that from the command line is a fantastic one. 

Yes that bug report - it is happening in exactly the same place. If the i18n related to a specific YAML file, then which one? I can go search for it and see what is happening before and after running the web installer and getting the error?

Regards


Anthony

Dan Gillean

unread,
Mar 26, 2020, 1:52:33 PM3/26/20
to ICA-AtoM Users
Hi Anthony, 

One possibility: 
During the installation process, this file should be copied to apps/qubit/config/setting.yml (notice, without the .tmpl). It's possible that this isn't completing properly for you, perhaps? 

You can go check out the current status of your file, and if it's missing information (or if it doesn't exist at all), copy it in from this version in our repository. That file, like all others, needs to be owned by the www-data user, so if necessary, re-run the permissions command.

I would then suggest you run the purge task, but MAKE SURE you have your backup still, as this will purge the current database! 
  • sudo -u www-data php symfony tools:purge
Now you can try loading your database backup, running the upgrade task, and then try clearing all caches and restarting services (Symfony cache, PHP-FPM, memcached if installed, etc), before finally trying to populate the search index, and see if that gets things going. 

Hopefully this will resolve things!!!

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/3f9742ca-e07c-4e53-84ba-7773403c8931%40googlegroups.com.

Dan Gillean

unread,
Mar 26, 2020, 1:53:56 PM3/26/20
to ICA-AtoM Users
Oops, quick follow up: 

Just to be extra certain, I also suggest that you drop and recreate the database BEFORE you run the purge task. 

Crossing my fingers for you!

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Anthony Sheehy

unread,
Mar 27, 2020, 10:41:06 AM3/27/20
to AtoM Users
Dan,

You might like to see this:

Annotation 2020-03-27 133050.png

Before running the web installer it has the same configuration at the tmpl. By the time it reaches the Search settings page, the settings.yml file becomes a zero-length file. Somewhere in between starting the web installer and Search settings page, the file is being wiped!!!


I replaced the settings.yml file using the template in the same directory and checked that the correct permissions were applied. Then I continued from the point above. The web installer completed without fault and the upgrade appears to be complete. I have ported the old data across and I'm done.

sudo rm apps/qubit/config/settings.yml
sudo cp apps/qubit/config/settings.yml.tmpl apps/qubit/config/settings.yml

Looks like y'all have yourself there a nasty bug. (Typed with a accent.)

Regards


Anthony



Dan Gillean

unread,
Mar 27, 2020, 11:28:01 AM3/27/20
to ICA-AtoM Users
Hi Anthony, 

Thank you so much for sharing this information - it will be useful for us as we continue to diagnose and resolve this issue. Thank you as well for persevering through these challenges! My hope is that we can explore this and resolve the core issue prior to the AtoM 2.6 release. In the meantime, this thread will be invaluable for helping other users who encounter similar issues, as well as in helping us develop a permanent solution. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/417c9d8f-7f8c-43bd-91db-1b77af614737%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages