Unable to install cernoverride

Hi,
I have downloaded the latest version of cernoverride and I I have been using it successfully in the past, but I can’t install it on our latest sites https://test-eam-service.web.cern.ch and eam-service.web.cern.ch
Can you please help?
Thanks,
Cat

The error message is

The website encountered an unexpected error. Please try again later.
 
Drupal\Core\Config\PreExistingConfigException: Configuration objects (cernoverride.settings) provided by cernoverride already exist in active configuration in Drupal\Core\Config\PreExistingConfigException::create() (line 65 of core/lib/Drupal/Core/Config/PreExistingConfigException.php).

Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('theme', 'cernoverride') (Line: 212)
Drupal\Core\Extension\ThemeInstaller->install(Array) (Line: 225)
Drupal\system\Controller\ThemeController->setDefaultTheme(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Hi,
can somebody please help us with this?
Cheers,
Cat

Hey @cat.hoch,

Are you added to the drupal-override-theme-users e-group ? (I mean with the admin/owner account for the respective website/s)

If not then kindly add yourself to the drupal-override-theme-users, you can self add yourself to this e-group and upon successful subscription to the e-group you should have access to use the CERN override theme for your website/s. Here is a reference documentation for the installation of the override theme Override the CERN theme | Drupal @ CERN

Note : In case If you do not have access even after subscribing to the e-group just wait for a few hours to a day as it takes few hours for the e-group to synchronise with Gitlab.

I hope this helps. Have a nice day ahead !

Regards,
Prakhar

Hi Prakhar,
I am part of the override-theme-users, I have downloaded the latest version and I have installed it successfully on many sites in the past as I said. The access is not the problem, but I can’t install it from the Appearance tab of the site, I get the error message I copied.
Regards,
Cat

Dear Cat

I will give you some tips based on my experience.
1- Tolerance and good spirits because the recipe may not work.
2- Make a backup of your site before you start, make sure the backup works.
3- Go to the “Appearance” menu and uninstall the “CERN override” theme.
4-Delete the theme physically from your website.

Recipe 1 (easier, but didn’t work for me)
1- you can use my Config Delete module https://www.drupal.org/project/module_config_delete. Install it and then go to the Configuration → Development → Configuration synchronization → Delete
2- choose what you want to delete and press the Delete button.
3- you must locate, by hand, everything that contains cernoverrride, it is a work of patience.

Recipe 2
1-Know PHP
2- Install the modules “Devel” and “Devel PHP”.
3-Locate the configurations you want to delete
Home>> Administration>>> Configuration>> Development Synchronize>> Single Export
Example: cernoverride_local_actions
4- Execute the following sentence in the PHP devel:
\Drupal::configFactory()->getEditable(‘cernoverride_local_actions’)->delete();
5- repeat the whole process with the keys found.

I repeat, it is a complex and risky process, with uncertain results. With calm and after several trials; it is sure to be achieved.
Best regards
Guillermo

Hi Guillermo,
thanks for getting back to me.
I usually use an empty installation for the development, never had a problem installing the override theme (e.g. cern.ch/en). Just tested it on plm-service site (another empty installation and it works). So I think the problem comes from the “Easy-Start-Website” that we used for the test-eam-service site. Since both the “Easy-Start-Website” as well as the cernoverride theme are centrally managed, can you please take a look on your side? The error points to the Core\Config to which we don’t have access to.
I tried installing the module_config_delete but it doesn’t give me the delete option in the Configuration synchronization and I am not going to dig into the php.
I have made a backup so please feel free to try anything.
Regards,
Cat

Dear Cat
It is not a Drupal Core error, it is an orphan entry in the website configuration. We also had the same problem and we solved it by deleting several keys within the configuration of our website, by code. I am not a Drupal administrator, just a webmaster on the ALICE experiment and I don’t have access to your website.
Best regards
Guillermo

Dear Guillermo,
sorry about that and thanks for clarifying, after the turnover I don’t know anymore who is working where :sweat_smile:
So following your example of recipe 2, deleting the cernoverride.settings already solved the problem :tada:
Thanks for sharing your experience,
Cat

Hi Cath

Thanks for confirming; I have marked @gmesaper’s post as the solution (thanks!).

Thanks!