- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
@kul.pratap any ideas? Otherwise let's leave this open to anyone who has one.
- 🇳🇱Netherlands johnv
I (maintainer) encounter the same issue after upgrading to D11.
I installed my XAMPP stack, and noticed that the database driver is now 'sqlite', instead of 'mysql' before. That was also the only option when installing the new Drupa-11 environment. No idea why the mariaDB/mySQL was not present.The database I created in phpMyAdmin is also still empty.
What driver are you using? Core fields can be created as before.
in D10:
/* $databases['default']['default'] = array ( 'database' => 'd10_20230821', 'username' => 'root', 'password' => '', 'prefix' => '', 'host' => 'localhost', 'port' => '3306', 'isolation_level' => 'READ COMMITTED', 'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql', 'driver' => 'mysql', 'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/', );
in D11:
$databases['default']['default'] = array ( 'database' => 'd11_20250110', 'prefix' => '', 'driver' => 'sqlite', 'namespace' => 'Drupal\\sqlite\\Driver\\Database\\sqlite', 'autoload' => 'core/modules/sqlite\\src\\Driver\\Database\\sqlite\\', );
- 🇩🇪Germany Anybody Porta Westfalica
Hi @johnv thank you! In our case that's definitely not the point. The database is the same as in Drupal 10 (MariaDB). And all other modules are working fine. So there must be a different reason in code here, I think.
I guess they choose SQLlite for demo installations as it comes with PHP and doesn't need additional configuration. But should be unrelated for sure.
- 🇳🇱Netherlands johnv
OTOH, the problem is generated by changing the ldefault widget in #3495529-8: Change default widget and formatter → .
In OfficeHoursItem.php, setting the default widget back to
* default_widget = "office_hours_default",
solves the problem.
But then, a following problem occurs..tbc. - 🇩🇪Germany Anybody Porta Westfalica
Sorry I created the issue fork because I thought I found the reason, but didn't :(
- 🇮🇳India kulpratap2002
"@johnv, as per #8, I have also changed the default_widget to office_hours_default, which solves the problem."
So should i create a MR with this change.
@anybody what are your suggestions? - 🇩🇪Germany Anybody Porta Westfalica
We should first find out why it fixes the issue - Our installation was fresh so it's not an upgrade path thing I think... @johnv should decide about a hotfix, please.
- 🇮🇳India kulpratap2002
@anybody, the issue is that default_widget = "office_hours_exceptions", but there is no widget with the ID office_hours_exceptions. The widget ID is actually office_hours_exceptions_only, so we can change it accordingly.
- 🇩🇪Germany Anybody Porta Westfalica
@kul.pratap I thought the same, but there is: https://git.drupalcode.org/issue/office_hours-3497658/-/blob/3497658-fie...
- 🇮🇳India kulpratap2002
So, we need to verify everywhere that the IDs of the field formatter and field widget are correct.
- 🇬🇧United Kingdom niklp Nottingham
Similar problem from another module, with a fix, related to db: https://www.drupal.org/project/iconify_field/issues/3496280 🐛 Drupal\Core\Field\FieldException: Attempted to create, modify or delete an instance of field with name field_icon on entity type node when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 316 of core/ Active
Might be helpful? I'm having the same problem.
- 🇩🇪Germany Anybody Porta Westfalica
Nice @niklp!
https://git.drupalcode.org/project/iconify_field/-/commit/0ccf3125574b0c... looks like a change worth trying! Could you prepare the MR accordingly?
- 🇳🇱Netherlands johnv
The problem is that the new default widget uses 'artificial' field definitions, that cannot not be created properly until the new fiedl definition is saved. The following patch circumvents that problem.
Automatically closed - issue fixed for 2 weeks with no activity.