Closed (fixed)
Project:
Entityqueue
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 May 2022 at 14:49 UTC
Updated:
16 Dec 2022 at 09:04 UTC
Jump to comment: Most recent
Comments
Comment #2
amateescu commentedThat error means that you queue (config entity) doesn't have its corresponding subqueue (content entity) created. You can either create the subqueue manually or delete the queue and re-create it.
Comment #3
aiphesThanks but I get another issue when I want to go to
admin/structure/entityqueuewith WSOD. The website run on PHP8, instead of Dev thats run on PHP7.4.TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 202 of modules/contrib/entityqueue/src/EntityQueueListBuilder.php).Comment #4
amateescu commentedThat's the same underlying problem, the missing subqueue entity.
Here's a snippet which creates it easily:
Comment #5
aiphesHow do I use this snippet ?
Can I reset all queues and recreate them ( in DB or elsewhere) .
Why config import do this unusable queues ?
Comment #6
amateescu commentedYou can put it in a .php file and execute it with Drush: https://www.drush.org/latest/commands/php_script/#examples
That's harder to do.
No idea.
Comment #7
aiphesAccording to the drush example I made a file called entityqueue.php with this code in it:
and I get an error like:
Error: Class 'EntityQueue' not found in include() (line 9 of /home/xx/www/xxx/config_d9pf/config_partager/scripts-php-drush/entityqueue/entityqueue.php).The only difference between Dev and Prod website is PHP version..but putting PHP7 on Prod change nothing.
Comment #8
amateescu commentedYou also need to add use statements for the classes that you are calling in the snippet:
Comment #9
aiphesAfter done modifications on the file like:
I get:
Comment #10
amateescu commented$queue = EntityQueue::load('File_test_php');Is
File_test_phpthe ID of your queue?Comment #11
aiphesnot, it's a test name, real is
actualites_brulante, so I try with the real name and I get this:Comment #12
amateescu commentedThat's a problem in the linkchecker module: https://www.drupal.org/project/linkchecker/issues/3203329
Comment #13
aiphesok I've posted on the issue because patch doesn't work on beta. So I removed linkchecker module, and run the modified script, no error. :)
But I get an error on
admin/structure/entityqueuelike in #3 :(TypeError: Argument 1 passed to Drupal\Core\Entity\EntityRepository::getTranslationFromContext() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /home/xxx/www/xxx/sited9/web/modules/contrib/entityqueue/src/Plugin/EntityQueueHandler/Simple.php on line 97 in Drupal\Core\Entity\EntityRepository->getTranslationFromContext() (line 93 of core/lib/Drupal/Core/Entity/EntityRepository.php).Comment #14
amateescu commentedThis means that either your subqueue was not created and saved properly, or you have multiple queues with this problem.
Comment #15
aiphesSo if I uninstall the module and reinstall it, and re import config it would work, now linkchecker is disabled ?
Comment #16
amateescu commentedI guess it should, but be careful with what other config is deleted (for example: views) when the queue is deleted when uninstalling the module.
Comment #17
aiphesI done the uninstall/reinstall process for entityqueue + import entityqueue config + import view config and all is back as designed. I will see if linkchecker will be updated to avoid the issue mentionned here. Thanks for your help.
Comment #18
amateescu commentedNo problem, glad you got it working :)
Comment #20
gbisht commentedFor reference purposes. added a patch in #3124403 to create a subqueue on the queue update operation.
After this patch just re-save the queue to create a subqueue.