Closed (fixed)
Project:
Olivero
Version:
8.x-1.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2020 at 00:21 UTC
Updated:
15 Jun 2020 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mherchelComment #3
brianperryCurrently taking a look at this one...
Comment #4
brianperryAttached patch moves search blocks and image style to optional install config which allows Olivero to be installed with the minimal profile.
There are probably a few things that should be cleaned up to improve the experience when enabling Olivero after a minimal install, but that seems to be out of the scope of this. I'll create issues - the most obvious one is that only the secondary menu displays, but the divider style is still used.
Also briefly looked at making search and image dependencies of the theme because that is a thing now: https://www.drupal.org/project/drupal/issues/474684 As it turns out, while you can define these dependencies, you can't yet force them to be installed: https://www.drupal.org/project/drupal/issues/3100374 Enabling search and image probably wouldn't be in the spirit of the minimal profile anyway...
Comment #5
andypostThemes could require modules now, but agree that search is often replaced by search_api so better put search block to optional config
Comment #6
thejimbirch commentedWonderful solution @brianperry!
Since Minimal doesn't have Search and Image, it makes perfect sense to make them optional and have Olivero preserve the "minimal" experience.
Marking at RTBC
Comment #7
maxpahHello,
I confirm that I also have the error on Drupal 8.8 and the patch in comment #4 corrects this issue well.
Thanks for the patch.
Comment #8
viappidu commentedIf the search module is not enabled we don't need to load the library either.
I simply added a checkbox on theme-settings, enabled only if the search module is installed
Thought as the easiest solution to avoid the script being loaded and giving an error.
Though I think it would be beneficial to use the block and library for the search_api module too. Wouldn't it be?
Comment #9
viappidu commentedComment #10
mherchelI'm going to commit the patch in #4. That being said, I agree that we shouldn't be loading unnecessary JS or libraries.. but I also want to avoid another theme setting (if possible).
I'm going to open up a followup issue for that.
Comment #11
mherchelOpened followup #3144260: Unnecessary JS / CSS should not be loaded if search is disabled
Comment #12
mherchel