kimai / Paid-plugins

Support for paid Kimai plugins: Discussions and feature requests
https://www.kimai.org/store/
11 stars 1 forks source link

Disable visibility of Activity throws error #164

Closed markus7777777 closed 2 weeks ago

markus7777777 commented 3 weeks ago

Discussed in https://github.com/kimai/Paid-plugins/discussions/163

Originally posted by **markus7777777** June 2, 2024 Hi everyone. I'm having trouble disabling the visibility of an activity. The same issue occurs when I try to edit an activity and add a tag to it. **Kimai Version: 2.17.0 Custom fields version: 2.0.7** **Log:** `[2024-06-02 08:25:11] [request] CRITICAL: Uncaught PHP Exception Error: "Call to a member function toArray() on array" at TagsExtension.php line 64 {"exception":"[object] (Error(code: 0): Call to a member function toArray() on array at /var/www/kimai/var/plugins/MetaFieldsBundle/Form/Extension/TagsExtension.php:64)"} [] [2024-06-02 08:25:11] [request] INFO: Matched route "admin_activity_edit". {"route":"admin_activity_edit","route_parameters":{"_route":"admin_activity_edit","_controller":"App\\Controller\\ActivityController::editAction","_locale":"de_AT","id":"38"},"request_uri":"http://kimai.local/activity/38/edit","method":"POST"} []` **Does anyone have any ideas on how to solve this?** ![image](https://github.com/kimai/Paid-plugins/assets/46875900/76f9b942-8458-425f-bb61-60ae504dc035)
pbksol commented 3 weeks ago

Just update des Custom Fields Plugin to the latest version and the error will go away.

markus7777777 commented 3 weeks ago

I bought the new version of the plugin but that didn't solve the issue.

The Auto Tag Column inside activities responds : "A string is necessary"

If i want to disable the custom field - the error from my initial issue pops up.

[2024-06-02 15:13:45] [request] CRITICAL: Uncaught PHP Exception Error: "Call to a member function getValues() on array" at MetaFieldRuleForm.php line 161 {"exception":"[object] (Error(code: 0): Call to a member function getValues() on array at /var/www/kimai/var/plugins/MetaFieldsBundle/Form/MetaFieldRuleForm.php:161)"} []
[2024-06-02 15:13:44] [request] INFO: Matched route "custom_meta_fields_edit". {"route":"custom_meta_fields_edit","route_parameters":{"_route":"custom_meta_fields_edit","_controller":"KimaiPlugin\\MetaFieldsBundle\\Controller\\MetaFieldsController::editAction","_locale":"de","id":"45"},"request_uri":"http://kimai.local/de/admin/custom-meta-fields/45/edit","method":"POST"} []

image

kevinpapst commented 3 weeks ago

You don't need to buy a new version for an update, if you have an active subscription.

If i want to disable the custom field - the error from my initial issue pops up.

What does that mean? How do you try to disable the field? Do you mean if you remove all tags from the field?

kevinpapst commented 3 weeks ago

You need at least the plugin version 2.6. better 2.7.0.

Can you show me the output:

bin/console kimai:version
bin/console kimai:plugins
markus7777777 commented 3 weeks ago

I had to purchase a new version because it was no longer available in my Lemonsqueezy account. I dont know why?

What does that mean? How do you try to disable the field? Do you mean if you remove all tags from the field?

My aim is to edit activities -> rename them -> add further tags -> disable visibility of some activites... All of these scenarios dont work.

bin/console kimai:version -> Kimai 2.17.0 by Kevin Papst.

image

markus7777777 commented 3 weeks ago

You need at least the plugin version 2.6. better 2.7.0.

Can you show me the output:

bin/console kimai:version
bin/console kimai:plugins

The latest Plugin Version available is 2.5.0 (LemonSqueezy)

kevinpapst commented 3 weeks ago

Please login at https://license.kimai.org/ and fetch the latest version

markus7777777 commented 3 weeks ago

I updated the Bundle but the error is still here.

image image

image

[2024-06-05 16:31:15] [request] CRITICAL: Uncaught PHP Exception Error: "Call to a member function getValues() on array" at MetaFieldRuleForm.php line 161 {"exception":"[object] (Error(code: 0): Call to a member function getValues() on array at /var/www/kimai/var/plugins/MetaFieldsBundle/Form/MetaFieldRuleForm.php:161)"} [] [2024-06-05 16:31:15] [request] INFO: Matched route "custom_meta_fields_edit". {"route":"custom_meta_fields_edit","route_parameters":{"_route":"custom_meta_fields_edit","_controller":"KimaiPlugin\\MetaFieldsBundle\\Controller\\MetaFieldsController::editAction","_locale":"de_AT","id":"45"},"request_uri":"http://kimai.local/de_AT/admin/custom-meta-fields/45/edit","method":"POST"} []

kevinpapst commented 3 weeks ago

I am not able to reproduce it. Sorry, but can you try to reproduce it in the demo: https://www.kimai.org/en/demo.html If it fails there as well, what is it that you are doing exactly? Like step-by-step.

markus7777777 commented 3 weeks ago

Thank you very much for your help. I tried to reproduce the problem on the demo version. In the demo it works fine and without any problems.

Please have a look into the attached pdf where I tried to reproduce the error.

Problem_Tags_Edit_Activity.pdf

kevinpapst commented 3 weeks ago

Ok, I think found the problem. If you have a lot of tags (more than 500) another dropdown type is used. And one of them fails.

markus7777777 commented 3 weeks ago
image

For this tag there are 7087 Timesheet entries. In sum, we have 3 different Tags.

kevinpapst commented 3 weeks ago

Can you please update to plugin version 2.8.0 and retry?

markus7777777 commented 2 weeks ago

Can you please update to plugin version 2.8.0 and retry?

Thanks a lot! That solved the issue!