dkan
dkan copied to clipboard
Cannot create sample-content and there are no related errors in the recent log messages
# vendor/bin/drush dkan:sample-content:create
+----------------+-----------+---------+---------+--------+
| run_id | processed | created | updated | errors |
+----------------+-----------+---------+---------+--------+
| sample_content | 10 | 0 | 0 | 10 |
+----------------+-----------+---------+---------+--------+
DKAN 2.X for Drupal 10.
@fishfree do you see error messages in the dashboard when you go to: /admin/dkan/datastore/status ?
Are you able to create a dataset manually?
@janette There is no error message in the dashboard:
The dataset in the screenshot above was manually created by me, however, when I open it, it shows page not found:
There is neither related errors in the recent log messages.
@fishfree the dataset link is taking you to the decoupled frontend, if you are using ddev, you can run
ddev dkan-frontend-install
ddev dkan-frontend-build
to get the frontend working.
Otherwise you will need to do a few more steps, make sure you have Node 16 or higher installed:
cd docroot
git clone https://github.com/GetDKAN/data-catalog-app.git frontend
cd frontend
npm install
npm run build
drush pm-enable dkan_js_frontend -y
drush config-set system.site page.front '/home' -y
drush cr
If you go to the Drupal content view, and click on the dataset node, that will show you the metadata but not the data preview table (yet).
@janette Thank you! I just explore it out myself with your tips from this issue #3952
However, I run again vendor/bin/drush dkan:sample-content:create
, still no datasets created.
@fishfree are you using DDEV or no? Can you list out the commands you are running starting from how you are adding dkan to your site to the point of running the drush dkan:sample-content:create
command.
I'm getting a similar problem you can reproduce it with the attached compose setup.
Untar the file
cd compose/v2
./build_images_for_compose.sh
docker compose up
Then you can get into the container.
docker exec -it v2-web-1 /bin/bash
drush install sample_content
drush dkan:sample-content:create -vvv
[preflight] Config paths: /home/drupal/home/vendor/drush/drush/drush.yml
[preflight] Alias paths: /home/drupal/home/docroot/drush/sites,/home/drupal/home/drush/sites
[preflight] Commandfile search paths: /home/drupal/home/vendor/drush/drush/src
[debug] Bootstrap further to find dkan:sample-content:create [0.03 sec, 8.18 MB]
[debug] Trying to bootstrap as far as we can [0.03 sec, 8.18 MB]
[info] Drush bootstrap phase: bootstrapDrupalRoot() [0.03 sec, 8.18 MB]
[info] Change working directory to /home/drupal/home/docroot [0.03 sec, 8.18 MB]
[info] Initialized Drupal 10.1.5 root directory at /home/drupal/home/docroot [0.03 sec, 8.23 MB]
[info] Drush bootstrap phase: bootstrapDrupalSite() [0.03 sec, 8.67 MB]
[debug] Could not find a Drush config file at sites/default/drush.yml. [0.04 sec, 8.9 MB]
[info] Initialized Drupal site default at sites/default [0.04 sec, 8.9 MB]
[info] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.04 sec, 8.9 MB]
[debug] Add service modifier [0.04 sec, 9.1 MB]
[info] Drush bootstrap phase: bootstrapDrupalDatabase() [0.04 sec, 9.62 MB]
[info] Successfully connected to the Drupal database. [0.04 sec, 9.62 MB]
[info] Drush bootstrap phase: bootstrapDrupalFull() [0.04 sec, 9.62 MB]
[debug] Start bootstrap of the Drupal Kernel. [0.04 sec, 9.62 MB]
[debug] Finished bootstrap of the Drupal Kernel. [0.06 sec, 14.49 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigCommands [0.11 sec, 25.03 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigExportCommands [0.12 sec, 25.06 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigImportCommands [0.12 sec, 25.07 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\BatchCommands [0.12 sec, 25.07 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\CliCommands [0.12 sec, 25.08 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\DrupalCommands [0.12 sec, 25.08 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\DeployHookCommands [0.12 sec, 25.1 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\EntityCommands [0.12 sec, 25.12 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\LinkHooks [0.12 sec, 25.13 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\ImageCommands [0.12 sec, 25.13 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\JsonapiCommands [0.12 sec, 25.15 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\LanguageCommands [0.12 sec, 25.15 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\LocaleCommands [0.12 sec, 25.16 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\MaintCommands [0.12 sec, 25.19 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\MessengerCommands [0.12 sec, 25.2 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\MigrateRunnerCommands [0.12 sec, 25.2 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\QueueCommands [0.12 sec, 25.25 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\RoleCommands [0.12 sec, 25.27 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\StateCommands [0.12 sec, 25.31 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\TwigCommands [0.12 sec, 25.32 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\UserCommands [0.12 sec, 25.33 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\ViewsCommands [0.12 sec, 25.38 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\WatchdogCommands [0.12 sec, 25.41 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldCreateCommands [0.12 sec, 25.44 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldInfoCommands [0.12 sec, 25.45 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldDeleteCommands [0.13 sec, 25.46 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldBaseOverrideCreateCommands [0.13 sec, 25.47 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldBaseInfoCommands [0.13 sec, 25.48 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\field\FieldEntityReferenceHooks [0.13 sec, 25.48 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\pm\PmCommands [0.13 sec, 25.49 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\pm\ThemeCommands [0.13 sec, 25.5 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommands [0.13 sec, 25.51 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommentsCommands [0.13 sec, 25.52 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeSessionsCommands [0.13 sec, 25.52 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserFieldsCommands [0.13 sec, 25.52 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserTableCommands [0.13 sec, 25.53 MB]
[debug] Add a commandfile class: Drupal\common\Commands\CommonCommands [0.13 sec, 25.53 MB]
[debug] Add a commandfile class: Drupal\common\Commands\JobStoreCommands [0.13 sec, 25.54 MB]
[debug] Add a commandfile class: Drupal\datastore\Drush [0.13 sec, 25.54 MB]
[debug] Add a commandfile class: Drupal\datastore\Commands\PurgeCommands [0.13 sec, 25.55 MB]
[debug] Add a commandfile class: Drupal\harvest\Commands\HarvestCommands [0.13 sec, 25.56 MB]
[debug] Add a commandfile class: Drupal\metastore\Commands\MetastoreCommands [0.13 sec, 25.6 MB]
[debug] Add a commandfile class: Drupal\metastore_search\Commands\RebuildTrackerCommands [0.13 sec, 25.6 MB]
[debug] Add a commandfile class: Drupal\sample_content\Drush [0.13 sec, 25.6 MB]
[debug] Add a commandfile class: Drupal\search_api\Commands\SearchApiCommands [0.13 sec, 25.6 MB]
[debug] Add a commandfile class: Drupal\views_bulk_operations\Commands\ViewsBulkOperationsCommands [0.13 sec, 25.69 MB]
[debug] Done with bootstrap max in Application::bootstrapAndFind(): trying to find dkan:sample-content:create again. [0.14 sec, 25.76 MB]
[info] Starting bootstrap to none [0.14 sec, 25.82 MB]
[info] Drush bootstrap phase 0 [0.14 sec, 25.82 MB]
[info] Try to validate bootstrap phase 0 [0.14 sec, 25.82 MB]
+----------------+-----------+---------+---------+--------+
| run_id | processed | created | updated | errors |
+----------------+-----------+---------+---------+--------+
| sample_content | 10 | 0 | 0 | 10 |
+----------------+-----------+---------+---------+--------+
@JoshuaSBrown was is the output of drush dkan:datastore:list
?
or visit /admin/dkan/datastore/status
There is no output:
$ drush dkan:datastore:list
--------------- ----------- ------------- ----------- ---------- -----------
Resource UUID File Name FileFetcher Processed Importer Processed
--------------- ----------- ------------- ----------- ---------- -----------
Todo: surface errors from the harvester transform so that users know to add the $settings['file_public_base_url'] value to their settings file.
@janette thanks for noting this! Documenting this in the install instructions would be great also.
I wonder if there is a way to adjust the code so that this setting doesn't need to be explicitly set - it seems like we must be doing something somewhat unusual/non-Drupally to need this?
@grugnog agree
@janette doing a bit of an issue cleanup sweep here... looks like this has been addressed, can you close if so?