🇬🇧United Kingdom @sam.foster

Account created on 8 December 2008, about 16 years ago
#

Recent comments

🇬🇧United Kingdom sam.foster

Hey all,

(updated before I even posted ! - as writing it gave me an idea - and it fixed my issue and now I've decided to post so anyone having same issue as me can see what I did - which was to manually apply code changes in https://www.drupal.org/files/issues/2021-12-09/2957376.patch by editing the /core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php file as I don't quite see how to actually re-roll a patch to share my fix - but I will be looking at that in a mo!)

I'm running updates from Drupal 8.9.20 to 9.5.11 and now seeing this error when running 'drush updb' and in relation to the
views update 'sort_identifier'

> [notice] Update started: views_post_update_sort_identifier
> [error] Error: Call to a member function getConfigDependencyKey() on null in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->calculateDependencies() (line 427 of /var/www/html/docroot/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php) #0 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(71): Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->calculateDependencies()
> #1 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(89): Drupal\views\Plugin\views\display\DisplayPluginBase->getPluginDependencies(Object(Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid))
> #2 [internal function]: Drupal\views\Plugin\views\display\DisplayPluginBase->calculatePluginDependencies(Object(Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid), 18)
> #3 /var/www/html/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(959): array_walk(Array, Array)
> #4 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(71): Drupal\views\Plugin\views\display\DisplayPluginBase->calculateDependencies()
> #5 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(89): Drupal\Core\Config\Entity\ConfigEntityBase->getPluginDependencies(Object(Drupal\views\Plugin\views\display\DefaultDisplay))
> #6 /var/www/html/docroot/core/modules/views/src/Entity/View.php(282): Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies(Object(Drupal\views\Plugin\views\display\DefaultDisplay))
> #7 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(320): Drupal\views\Entity\View->calculateDependencies()
> #8 /var/www/html/docroot/core/modules/views/src/Entity/View.php(292): Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
> #9 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(562): Drupal\views\Entity\View->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
> #10 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(517): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\views\Entity\View))
> #11 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(253): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\views\Entity\View))
> #12 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\views\Entity\View))
> #13 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(608): Drupal\Core\Entity\EntityBase->save()
> #14 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php(192): Drupal\Core\Config\Entity\ConfigEntityBase->save()
> #15 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php(147): Drupal\Core\Config\Entity\ConfigEntityUpdater->doOne(Object(Drupal\views\Entity\View), Object(Closure))
> #16 /var/www/html/docroot/core/modules/views/views.post_update.php(88): Drupal\Core\Config\Entity\ConfigEntityUpdater->update(Array, 'view', Object(Closure))
> #17 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(288): views_post_update_sort_identifier(Array)
> #18 /var/www/html/vendor/drush/drush/includes/batch.inc(256): Drush\Commands\core\UpdateDBCommands::updateDoOnePostUpdate('views_post_upda...', Object(DrushBatchContext))
> #19 /var/www/html/vendor/drush/drush/includes/batch.inc(201): _drush_batch_worker()
> #20 /var/www/html/vendor/drush/drush/includes/batch.inc(95): _drush_batch_command('2632')
> #21 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(131): drush_batch_command('2632')
> #22 [internal function]: Drush\Commands\core\UpdateDBCommands->process('2632', Array)
> #23 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
> #24 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #25 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #26 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #27 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #28 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #29 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #30 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #31 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #32 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
> #33 /var/www/html/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run(Array)
> #34 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
> #35 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
> #36 {main}
> [warning] Drush command terminated abnormally.

putting these patches in and running 'composer update --lock' to add the patches as I do for other such issues. These patches not applying - and I think I tried the all now - but I'm not confident I have added to the right section of my composer.json

Should they be added to 'drupal/core' or 'drupal/views' or 'drupal/taxonomy'

Or is it just these patches don't yet work for 9.5.11?

Sam

(as above - I worked out that the code in the patch https://www.drupal.org/files/issues/2021-12-09/2957376.patch seems to fix the issue in Drupal 9.5.11 it's just that it doesn't successfully apply with Composer for reasons I'm not entirely clear on but which probably relate to the diff between the patch and the target file) - at least having manually changed the code and run drush updb I am now getting a successful outcome of updb.

Can anyone tell me though - should I really roll back to an earlier version on Drupal and apply a patch successfully or won't it matter if the update has now run using 9.5.11?

🇬🇧United Kingdom sam.foster

Hi there

I have a problem very similar to this and also use the groups module in a complex build. Did you get any pointers on what this error might be and how to fix it. I'm real stumped right now!

Thanks

Sam

🇬🇧United Kingdom sam.foster

Guys

Any update at all - can REST API actually create translated nodes and establish the relationship between the original node and the translated one?

If not are there any work arounds?

Surely someone out there knows something?

Thanks

Sam

🇬🇧United Kingdom sam.foster

Hey guys,

What is the current state of play for this issue? We have Drupal 8.9.2 and are using JSON:API to create English nodes, but we need to create translations of those nodes into Welsh. The Content Type is correctly set up to allow translation, and we can of course create a translation with the GUI, but is this now possible using the JSON:API module or via some other means?

Can any of these patches here be successfully applied to deliver such functionality? I've tried patching in the drupal/core section of my composer.json but the patch won't apply. Is that because it is now in the core or is it because the patches no longer work with the current version I have as part of Drupal 8.9.2?

Any pointers will be greatly appreciated

Cheers

Sam

Production build 0.71.5 2024