Problem/Motivation
When I try to install the Geolocation Demo module the following error occurs:
InvalidArgumentException: Field field_geolocation_demo_term_icon is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (Zeile 617 in /var/www/ud18_88/html/terrafera/core/lib/Drupal/Core/Entity/ContentEntityBase.php).
#0 /var/www/ud18_88/html/terrafera/core/lib/Drupal/Core/Entity/ContentEntityBase.php(597): Drupal\Core\Entity\ContentEntityBase->getTranslatedField()
#1 /var/www/ud18_88/html/terrafera/core/lib/Drupal/Core/Entity/ContentEntityBase.php(658): Drupal\Core\Entity\ContentEntityBase->get()
#2 /var/www/ud18_88/html/terrafera/modules/contrib/geolocation/modules/geolocation_demo/geolocation_demo.install(45): Drupal\Core\Entity\ContentEntityBase->set()
#3 /var/www/ud18_88/html/terrafera/core/lib/Drupal/Core/Extension/ModuleInstaller.php(829): geolocation_demo_install()
...
Afterwards the module is marked as installed but I can't find any demo content.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3594932-geolocation-demo-install.patch | 4.7 KB | dkmishra |
Issue fork geolocation-3594932
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dkmishra commentedAttached patch moves the configuration required by geolocation_demo_install() from config/optional to config/install.
Drupal runs hook_install() before optional configuration is installed. As a result, the install hook tries to populate fields that do not yet exist. Moving the required content type, vocabulary, field storage, and field configuration ensures they are available before the install hook creates demo terms and nodes. The patch applies cleanly to 4.0.0-beta2.
Comment #4
janc48 commentedInstalling the demo module now creates some data, it returns with 500 server error though leaving no watchdog record behind.
The demo data is however without pages and views and doesn't help me much.
Thank you for your fix anyway @dkmishra!
Comment #5
christianadamski commentedPlease try current dev and see if it works for you now please.
Comment #6
janc48 commentedThere is no error when installing with dev.
Comment #7
christianadamski commentedStable release should also work fine now.
Thanks!