pimcore / data-hub

Data delivery & consumption platform for Pimcore.
Other
125 stars 107 forks source link

DataHub Install in PimCore Admin is not working as expected #166

Closed jusufcodes closed 4 years ago

jusufcodes commented 4 years ago

The PimCore DataHub Installation is failing for me. Clearing the cache did not help.

I installed it as follow composer require pimcore/data-hub "0.5" same for when I tried with composer require pimcore/data-hub:dev-master After the composer I proceeded in PimCore admin under Bundles as follow:

Enable DataHub -> Success Install DataHub

Install DataHub shows a Dialog with the following message:

Please don't forget to clear the cache and reload pimcore after your modifications! Installing bundle PimcoreDataHubBundle No migrations to execute.

The pimcore/data-hub package however shows 2 available Migrations.

Any instruction would be helpful!


If its any helpful, this is my composer.json

{ "name": "pimcore/demo-basic-twig", "type": "project", "license": "GPL-3.0-or-later", "config": { "optimize-autoloader": true, "sort-packages": true }, "require": { "php": ">=7.2", "pimcore/data-hub": "0.5", "pimcore/pimcore": "~6.2.0", "wikimedia/composer-merge-plugin": "^1.4" }, "require-dev": { "cache/integration-tests": "^0.16.0", "codeception/codeception": "~2.4.5" }, "autoload": { "psr-4": { "": ["src/"], "Pimcore\Model\DataObject\": "var/classes/DataObject", "Pimcore\Model\Object\": "var/classes/Object", "Website\": "legacy/website/lib" }, "classmap": [ "app/AppKernel.php" ] }, "scripts": { "post-create-project-cmd": "Pimcore\Composer::postCreateProject", "post-install-cmd": [ "Pimcore\Composer::postInstall", "@pimcore-scripts" ], "post-update-cmd": [ "Pimcore\Composer::postUpdate", "@pimcore-scripts", "Pimcore\Composer::executeMigrationsUp", "@pimcore-scripts" ], "pimcore-scripts": [ "Pimcore\Composer::clearCache", "Pimcore\Composer::installAssets" ] }, "extra": { "symfony-app-dir": "app", "symfony-bin-dir": "bin", "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", "symfony-assets-install": "relative", "merge-plugin": { "include": [ "composer.local.json" ], "recurse": true, "replace": true, "merge-dev": true, "merge-extra": false, "merge-extra-deep": false, "merge-scripts": false } } }

NiklasBr commented 4 years ago

Unfortunately you have to run the migrations manually, see #110 for more info.

jusufcodes commented 4 years ago

@NiklasBr thanks for the suggestion. Did not help sorry.

After diving deeping into the subject, I discovered that the PimCode Datahub Migrations did migrate. Since I can find the Migration Version Numbers in the database, including the tables.

What was missing for me was the data entry in the 'users_permission_definition' db table.

After running the following SQL Query, the extension activated. Shows no sign of error up till now.

INSERT INTOusers_permission_definitionsVALUES ('plugin_datahub_config', '');

Closing issue :)

weisswurstkanone commented 4 years ago

So maybe there is something missing then and should be investigated?

weisswurstkanone commented 4 years ago

For me the dialog looks like this

Installing bundle PimcoreDataHubBundle

Migrating up to 00000001 from 0

  ++ migrating 00000001

Migration 00000001 was executed but did not result in any SQL statements.

  ++ migrated (0.03s)

  ------------------------

  ++ finished in 0.03s
  ++ 1 migrations executed
  ++ 0 sql queries
  -- Marking version 20190614135736 as migrated
  -- Marking version 20190904131554 as migrated

After reloading the admin UI everything worked as expected. Also checked for the plugin_datahub_config value, it is there.