uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
MIT License
8.53k stars 459 forks source link

Agent activity list xhr request 500 internal server error Notice: Undefined index: after #441

Closed tamer-hassan closed 2 years ago

tamer-hassan commented 3 years ago

Dear,

Fresh install and upon clicking agent activity list, it loads forever, and in inspector, the xhr request shows 500 internal server error, with symfony page about "Notice: Undefined index: after"

This is a bit strange given the XHR request URL contains both after and before query parameters

Screenshot below image

Sanjaybhattwebkul commented 3 years ago

@tamer-hassan

This issue is fix in our new release V1.0.16

List-Agent Agent-Activity

Sanjaybhattwebkul commented 3 years ago

@tamer-hassan

Have you checked this issue with the new release V1.0.16, If you are getting this issue again then let me know

tamer-hassan commented 3 years ago

@Sanjaybhattwebkul

Upgraded to v1.0.16 but the issue still occurs (even after hard refresh) Notice the line number of the error exception is now different after the upgrade, but the same error.

image

vipin-shrivastava commented 3 years ago

@tamer-hassan As I checked with V1.0.16. Agent activity is working fine. I also added a screenshot here. Screenshot_4

Run cache clear command => Php bin/console c:c

After running the cache clear command then check again. If you still getting the same issue please let me know.

tamer-hassan commented 3 years ago

@vipin-shrivastava

I already have done that as part of the update instructions... Nevertheless, I ran the cache clear command again

# php bin/console c:c

 // Clearing the cache for the dev environment with debug true                                                          

 [OK] Cache for the "dev" environment (debug=true) was successfully cleared. 

But still getting the same error as in the last screenshot above.

By the way, in case it matters, this is a fresh install and there's no agent activity yet.

tamer-hassan commented 3 years ago

Update: I edited the .env file in the root of the project, and changed: APP_ENV=dev to: APP_ENV=prod

The issue then doesn't happen.

vipin-shrivastava commented 3 years ago

@tamer-hassan

In APP_ENV=prod mode It will not show any error to you. If you want to know about the error use APP_ENV=dev mode.

tamer-hassan commented 3 years ago

@vipin-shrivastava default fresh install .env file contained APP_ENV=dev I guess this was the problem

vipin-shrivastava commented 3 years ago

@tamer-hassan Are you still getting the 500 internal server error?

No, That's not the problem. Actually, fresh uvdesk is always set to development mode in the .env file.

tamer-hassan commented 3 years ago

yes, in dev mode I still get the 500 internal server error with Notice: undefined index: after

vipin-shrivastava commented 3 years ago

@tamer-hassan Please follow the below steps :

  1. Download the zip from here.
  2. After downloading the project (zip) extract it.
  3. Now, Go to the **uvdesk-community-v1.0.16->vendor->uvdesk** folder location.
  4. Here, you have to copy two folders Core-framework & support-center-bundle.
  5. After copy from here, Paste it in your project file location **your_project_name->vendor->uvdesk** first delete these two only from here then paste it.

Now, you issue is resolved. If you still getting the same issue please let me know

tamer-hassan commented 3 years ago

Tried what you suggested, but same issue, as what you described doesn't change anything since I followed the upgrade instructions in the forum to the T and already had the latest core-framework and support-center-bundle with composer update. https://forums.uvdesk.com/topic/1833/how-to-upgrade-uvdesk

I also re-ran php bin/console c:c after doing what you suggested, but same error.

image

vipin-shrivastava commented 3 years ago

@tamer-hassan

Have you copied the core framework & support-center-bundle folder from the downloaded & paste it into your project?

If you have done, Please run the following command in sequential order

php bin/console d:c:clear-metadata
php bin/console d:s:u --force --dump-sql --complete
php bin/console c:c  
php bin/console c:c --env prod

Hope this will work for you

tamer-hassan commented 3 years ago

no , that doesn't help either

vipin-shrivastava commented 3 years ago

@tamer-hassan

Mail your issue on Support@uvdesk.com. Our support team member will help you .

PeopleInside commented 3 years ago

Hi @tamer-hassan , the issue still persist? I'm unable to replicate with PHP 7.4, what is your PHP version?

The issue is present also if you set UVdesk to prod mode and clean cache? Have you tried to check logs? How to debug errors

vipin-shrivastava commented 2 years ago

@tamer-hassan are you still facing the same issue? Any update?

komal-sh-27 commented 2 years ago

There is no updates from your side so we are closing this issue. If still facing the same issue please let us know.

tamer-hassan commented 2 years ago

Updated to v1.0.18 and issue still exists PHP 7.4.3 if that is worth noting

again as mentioned before, this issue happens only in dev mode , not in prod mode. Obviously because in prod mode, php notices are ignored

vipin-shrivastava commented 2 years ago

@tamer-hassan

Can you please share the screenshot again & also tell us what issues are you facing after updating in v1.0.18?

tamer-hassan commented 2 years ago

Issue is the same as titled in the issue here, when clicking "Agent Activity", the page loads forever, and the XHR request gives 500 internal server error with the "Notice: Undefined index: after"

image

from var/log/dev.log

[2021-11-22T09:17:28.688041+01:00] request.CRITICAL: Uncaught PHP Exception ErrorException: "Notice: Undefined index: after" at /var/www/support/vendor/uvdesk/core-framework/Controller/Report.php line 70 {"exception":"[object] (ErrorException(code: 0): Notice: Undefined index: after at /var/www/support/vendor/uvdesk/core-framework/Controller/Report.php:70)"} []

vipin-shrivastava commented 2 years ago

@tamer-hassan After updating to v1.0.18, Please run the below command & then check again :

PHP bin/console d:s:u --force
PHP bin/console c:c

If you still facing the same issue please let us know.

tamer-hassan commented 2 years ago
# php bin/console d:s:u --force

 Updating database schema...

     4 queries were executed

 [OK] Database schema updated successfully!

# php bin/console c:c

 // Clearing the cache for the dev environment with debug true                                                          

 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.

Still facing the same issue!

vipin-shrivastava commented 2 years ago

@tamer-hassan

Mail your helpdesk URL with admin login credentials on Support@uvdesk.com. Our support team members will help you.

tamer-hassan commented 2 years ago

I did contact support@uvdesk.com ... they did the same thing I did and mentioned here before as a workaround (changing APP_ENV to "prod" instead of "dev" in the .env file) 😄 and told me the issue is solved.

vipin-shrivastava commented 2 years ago

@tamer-hassan

Have you checked on dev mode? are you still getting the same issue?

tamer-hassan commented 2 years ago

apologies.. switched it back to dev mode, cleared cache, and it is indeed working..