Entity Usage (8x.2.0-beta11) on Drupal 10-07 is Broken / NOT Functioning (At All)

Problem/Motivation

Module is Installed on Drupal 10 (Olivero and or bootstrap 5 theme), with PHP 8.1.17. Mysql 8.0.32 cll live.PHP memoery set at 256MB
SERVER condition : Apache/Litespeed (NOT Nginx) on CPANEL shared hosting account, via softaculous (basic/common) install method ( similar to the drupal 10 manual install via ZIP download) . D10 is installed on the the main/root Domain Folder i.e.: "www.mydomain.com/"

the default "admin - config - entity usage setting" is not touched / changed at all (I'm using the default setting)
[After installing the Entity Usage module, I've cleared cache, and run cron)

Problem 1 (On Drupal 1007) : Entity Usage module seems NOT functioning / running at all .
The 'Usage TAB' exist on the Node/ContentEntity "editting-page view" and MediaEntity-Image "editting-page view" , but when we enter the TAB it only shows :

" There are no recorded usages for entity of type: media with id: 1"

OR

"There are no recorded usages for entity of type: node with id: 1"

.

Problem 1 (On Drupal 9.57) : Entity Usage module seem to function normal / OK

Problem 2. (On Drupal 1007): when running the admin - config - entity usage setting - "batch update" click "Recreate Entity Usage" button ,
it shows the following errors message

"
Updating entity usage statistics. Add to Default shortcuts
This batch encountered an error.
Please continue to the error page

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=3&op=do_nojs&op=do
StatusText: error
ResponseText: The website encountered an unexpected error. Please try again later."

Problem 2. (On Drupal 9.57) : the AJAX problem also occurs when pressing the "Batch Update/Recreate Entity Usage" "Button", although with different error message (attached below)

"Updating entity usage statistics. Add to Default shortcuts
This batch encountered an error.
Please continue to the error page

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /d2/batch?id=4&op=do_nojs&op=do
StatusText: parsererror
ResponseText: "

Steps to reproduce

Normal / Fresh Install Drupal 10-07 and module via composer method "composer require 'drupal/entity_usage:^2.0@beta'", install module from Extend menu. Clear cache, Run Cron, go to admin-config-Entity Usage (settings)

As sidenote : for the above problem occurs on whether the "entity tracker module"(Entity Tracking API https://www.drupal.org/project/entity_track) installed (or Not installed ) i've tried/tested on both condition, both are showing the same error/results. Sincerely hope the main team can come up with solution. thk u and all the best.

Proposed resolution

The function should be running normally as descibed in the project description. I think I might have installed in the past on drupal 9.x (before 9.5/pre-10 update) and it was functioning.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

infohome created an issue. See original summary.

infohome’s picture

infohome’s picture

Title: Entity Usage (8x.2.0-beta11) on Drupal 10-07 is not Functioning (At All) » Entity Usage (8x.2.0-beta11) on Drupal 10-07 is Broken / NOT Functioning (At All)
Issue summary: View changes
infohome’s picture

Issue summary: View changes
rajab natshah’s picture

Facing the same issue.
Not sure if it is from the caching system or from playing with weights for the event subscriber.
Or that is from accessCheck by the last change from #3348439: Fix Entity queries must explicitly set whether the query should be access checked or not in Entity Usage
from last release.
Should we be waiting for the cron to run to count ( When testing ). Or counting is on actions and events?

infohome’s picture

Issue summary: View changes
marcoscano’s picture

Hi all, thanks for opening this ticket.
I have just triggered a test execution with PHP 8.1, MySQL 8, and Drupal 10.0.7, and all automated tests included in the module passed: https://www.drupal.org/pift-ci-job/2651702

It would be great to be able to see more information on the failing scenario. Can any of you try to get to the failing scenario, then check the Drupal log messages, and see if there are any further information there? The AJAX error indicated above does suggest there's something going on, but it doesn't give us enough information about what the actual problem is, so it would be good to get that either from the logs or from the browser console.

Thanks!

chrissnyder’s picture

Is this issue resolved with the changes in the beta12 version of the module. That release includes an Ajax error bug fix.

delacosta456’s picture

hi all
i don thinks this have be resolved
I just got the same issue today with Varbase9.16(D.10.3.8 -- PHP8.3 -- MysqlV5)

Thanks