Re-installation error: module farmOS UI Views (2.0.0-beta1)

After installing the module “Layout builder” for experimental reasons the farmOS menu disappeared. Hence, I uninstalled the “Layout builder” and all farmOS menu related modules. Then I tried to re-install the farmOS menu related modules. The following error ocurred:
“It’s not possible to install farmOS UI Views. views.view.farm_people is already available in the active configuration.”
How can I fix this?

1 Like

@Farmy - thanks for reporting this. This indicates that the farm_ui_views module was not properly cleaning up after itself. I’ve fixed it in this commit: Add enforced module dependencies to farm_people and farm_inventory Vi… · farmOS/farmOS@9766833 · GitHub

To fix it in your instance, you will need to manually delete the views.view.farm_people config before you can reinstall farm_ui_views.

This can be done via Drush:

drush config:delete views.view.farm_people

Then you should be able to drush en farm_ui_views. Although it may already be installed (and maybe in a partially broken state due to that error). Always best practice to backup your database before playing around with stuff like this because it is possible to break stuff. But it sounds like you’re just experimenting so I assume it’s not real data…

1 Like

Thanks @mstenta. I didn’t install the dev environment like Drush yet. I just installed FarmOS with a packaged release and can’t simply re-install it due to limitations of my host provider. I guess I need to locally setup a webserver to play around with FarmOS first.
However, is there any chance to manually delete views.view.farm_people, e.g. delete it in the mysql database or some of the PHP files?

Yes highly recommend having a dev environment to play with that is separate from your “production” deployment.

is there any chance to manually delete views.view.farm_people, e.g. delete it in the mysql database or some of the PHP files?

Yes you can also delete it through the UI… there are two ways:

  1. Install the “Views UI” module.
  2. Go to /admin/structure/views.
  3. Find the farm_people View and there will be an option to delete it on the right.

Or:

  1. Install the “Configuration Update Reports” module.
  2. Go to /admin/config/development/configuration/report/type/view
  3. You should see views.view.farm_people in the “Added configuration items” section, with an option to delete it.
1 Like

Perfect. It worked. I also had to fix it for “farmOS UI Map”. However, at the end the original farmOS menu was not restored. Which one of the modules does the farmOS menu with the menu icons install?

1 Like

Great!

Try enabling the farm_ui module. This is basically a simple module that doesn’t do anything itself, but depends on all the farm_ui_* modules, so enabling that will ensure that all of the others get enabled as well. That may restore your icons (you probably need farm_ui_theme).

This was actually my intention. All farmOS ui modules are re-enabled, but the original menu is not restored…

1 Like

Can you post a screenshot? I’m not entirely sure what you mean.

Admin view

1 Like

Worker view - without / blank menu

1 Like

@Farmy Have you tried clearing your cache? Go to /admin/config/development/performance and push the button there.

If all the right modules are enabled then it should be replacing the toolbar admin menu with the farmOS menu.

Here is the code that does that (in the farm_ui_menu module): farmOS/farm_ui_menu.module at 2.x · farmOS/farmOS · GitHub

@mstenta Caching was disabled and clearing the cache didn’t help. Maybe I need to setup the dev environment…

1 Like

Ah hmm. Do you have the “Menu UI” module enabled? Or did you? I think that module allows you to override the default menu arrangements, and that may mean that the code in our module is not having any affect. I’m not sure if disabling “Menu UI” will fix things… or if those overrides persist. That is what I would suggest looking into…

Yes, the “Menu UI” was enabled. I disabled it and the farmOS ui modules as well. Then enabled the farmOS ui modules again. No luck…

1 Like

After installing the module “Layout builder” for experimental reasons the farmOS menu disappeared.

I just tried this myself and the menu did not disappear for me. So there must be more to it. If you can find a way to reliably replicate this on a fresh installation then maybe we can pinpoint the cause… and from there find a solution.

You may want to just do a fresh install to “reset” back to the default farmOS configuration either way. Introducing changes to the defaults introduces risks that other things may have also been broken. We can only guarantee that “default” farmOS works… any changes you make beyond that puts you in uncharted territory… :slight_smile: