- 🇨🇦Canada mandclu
The configuration for that vocabulary is provided by the module, and should have been imported when the module was installed. Did you encounter any errors during install?
Actually, looking at the module's code I believe I see the problem. For the import of the configuration to work as expected the taxonomy module needs to be installed, but it isn't listed as a requirement in alerts.info.yml. I will update to fix that, but that won't help a site where this module is already installed.
If you're still having this problem I would suggest manually importing the taxonomy.vocabulary.alert_severity.yml configuration file.
- Status changed to Fixed
12 months ago 7:15pm 18 April 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- First commit to issue fork.
- Merge request !3Solution for Error: Call to a member function getString() → (Open) created by shyam-sawhney
- 🇦🇹Austria shyam-sawhney
Hello @mandclu
It's a very nice module thanks for it. But this issue is not related to import.
install YML are working perfectly and creating Taxonomy and field once we are installing it. It's a issue in fetch. The field_color is not considering the default untill you hit a save on individual Taxonomy.
error is in alerts.module
a possible easy fix is.
$colors = [];
foreach ($terms as $tid => $term) {
if($term) {
if( $term->get('field_color')->getValue()){
$color = $term->field_color->first()->getString();
$colors[$tid] = '.alert-severity-' . $tid . ' { background: ' . $color . '; }';
}
}
}created a MR