dexterity42 / SharedProjectTimesheetsBundle

Shared Project Timesheets Bundle - Kimai 2 Plugin
MIT License
9 stars 14 forks source link

SharedProjectTimesheetsBundle with an exception #22

Closed Linuxmaker closed 2 years ago

Linuxmaker commented 2 years ago

Hi there, I installed your plugin on a Kimai 1.6.1 and Debian 11 Linux. Unfortunately that does not start, but throws out these log messages:

[2021-11-18 08:37:59] request.INFO: Matched route "manage_shared_project_timesheets". {"route":"manage_shared_project_timesheets","route_parameters":{"_route":"manage_sh,"_controller":"KimaiPlugin\\SharedProjectTimesheetsBundle\\Controller\\ManageController::index","_locale":"de"},"request_uri":"http://timerecording.example.tld/de/adheets","method":"GET"} []
[2021-11-18 08:37:59] security.DEBUG: Read existing security token from the session. {"key":"_security_secured_area","token_class":"Symfony\\Component\\Security\\Core\\AernamePasswordToken"} []
[2021-11-18 08:37:59] security.DEBUG: User was reloaded from a user provider. {"provider":"App\\Security\\KimaiUserProvider","username":"Admin"} []
[2021-11-18 08:37:59] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"secured_area","authenticators":1} []
[2021-11-18 08:37:59] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"secured_area","authenticator":"App\\Security\\TokenAuthenticator"} []
[2021-11-18 08:37:59] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"secured_area","authenticator":"App\\Security\\TokenAuthenticator
[2021-11-18 08:37:59] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: "An exception occurred while executing 'SELECT k0_.id AS iare_key_1, k0_.password AS password_2, k0_.entry_user_visible AS entry_user_visible_3, k0_.entry_rate_visible AS entry_rate_visible_4, k0_.record_merge_mode AS record_mehart_visible AS annual_chart_visible_6, k0_.monthly_chart_visible AS monthly_chart_visible_7, k0_.project_id AS project_id_8 FROM kimai2_shared_project_timesheets k0_ IN k1_ ON (k0_.project_id = k1_.id) ORDER BY k1_.name ASC, k0_.share_key ASC':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kimai2.kimai2_shared_project_timat /srv/www/kimai2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 61 {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundExceptio occurred while executing 'SELECT k0_.id AS id_0, k0_.share_key AS share_key_1, k0_.password AS password_2, k0_.entry_user_visible AS entry_user_visible_3, k0_.entry_ratvisible_4, k0_.record_merge_mode AS record_merge_mode_5, k0_.annual_chart_visible AS annual_chart_visible_6, k0_.monthly_chart_visible AS monthly_chart_visible_7, k0_.pr FROM kimai2_shared_project_timesheets k0_ INNER JOIN kimai2_projects k1_ ON (k0_.project_id = k1_.id) ORDER BY k1_.name ASC, k0_.share_key ASC':\n\nSQLSTATE[42S02]: Basd: 1146 Table 'kimai2.kimai2_shared_project_timesheets' doesn't exist at /srv/www/kimai2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:61, Doctrixception(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kimai2.kimai2_shared_project_timesheets' doesn't exist at /srv/www/kimai2/vendor/doctriL/Driver/PDO/Exception.php:18, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kimai2.kimai2_shared_project_timesheets' doesn't exindor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:137)"} []
[2021-11-18 08:37:59] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} []

Can you help me fix this error?

Thanks and best regards

Andreas

dexterity42 commented 2 years ago

Hi @Linuxmaker, the log message says table 'kimai2.kimai2_shared_project_timesheets' does not exist, so I would assume that the migration was not performed correctly. Did you install the plugin as described in the README file?

Linuxmaker commented 2 years ago

Did you install the plugin as described in the README file? I have installed it corresponding your install howto on the marketplace. But it's okay now. Meanwhile it is running. Thanks

dexterity42 commented 2 years ago

@Linuxmaker Did the error resolve itself? Did a cache clear and warmup the trick? Would be nice to know to help other people if they come up with the same issue. Thanks in advance!

Linuxmaker commented 2 years ago

I would say I was my mistake because I installed the plugins in the same way as the other plugins:

cd var/plugins/
git clone https://github.com/dexterity42/SharedProjectTimesheetsBundle.git
cd -
bin/console kimai:reload --env=prod
chown -R www-data:www-data . && chmod -R g+r .  && chmod -R g+rw var/ && chmod -R g+rw public/avatars/

I had not carried out the special commands for this plugin.

bin/console cache:clear
bin/console cache:warmup
bin/console kimai:bundle:shared-project-timesheets:install

That's all.

dexterity42 commented 2 years ago

Alright, thank you for the details - and i'm glad that everything is working now. Thank you for using the plugin 😃