- Issue created by @yustinTR
- Status changed to Needs review
over 1 year ago 7:57am 2 May 2023 - Status changed to Needs work
over 1 year ago 10:11am 2 May 2023 - 🇮🇳India omkar_yewale Mumbai
Hi @yustinTR,
It is not sufficient to change core_version_requirement to make the module Drupal 10 compatible.
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not.
$nids = $this->entityTypeManager->getStorage('node')->getQuery('AND')->condition('type', $values['source_machine_name'])->execute(); To $nids = $this->entityTypeManager->getStorage('node')->getQuery('AND')->accessCheck(FALSE)->condition('type', $values['source_machine_name'])->execute();
- Status changed to Needs review
over 1 year ago 6:56am 3 May 2023 - 🇳🇱Netherlands yustinTR
Sorry i forgot to edit the info.yml in my last patch
- Status changed to Needs work
over 1 year ago 8:30am 3 May 2023 - 🇮🇳India omkar_yewale Mumbai
Hi @yustinTR,
Please add an access check with proper syntax.
$nids = $this->entityTypeManager->getStorage('node')->getQuery('AND')->condition('type', $values['source_machine_name'])->accessCheck()>execute();
To
$nids = $this->entityTypeManager->getStorage('node')->getQuery('AND')->condition('type', $values['source_machine_name'])->accessCheck()->execute();
- Status changed to Needs review
over 1 year ago 9:46am 3 May 2023 - First commit to issue fork.
- @falco010 opened merge request.
- 🇳🇱Netherlands falco010 🇳🇱 The Netherlands
In case you need to upgrade to Drupal 10, you can use the fork/MR created above. I added the patch from #10 to it.
Add the following to your composer.json repositories:
{ "type": "package", "package": { "name": "drupal/content_type_clone", "version": "1.x-dev", "type": "drupal-module", "source": { "type": "git", "url": "https://git.drupalcode.org/issue/content_type_clone-3357574.git", "reference": "2e5f125152b18208204b8b7527818137972e86bf" } } },
And run the following command:
composer require drupal/content_type_clone
- 🇦🇺Australia pasan.gamage
For me what worked out was this in my composer. Under repositories;
{ "type": "package", "package": { "name": "drupalcode/content_type_clone", "version": "3357574", "type": "drupal-module", "source": { "type": "git", "url": "https://git.drupalcode.org/issue/content_type_clone-3357574.git", "reference": "3357574-drupal-10-compatibility" } } },
and then under require;
"drupalcode/content_type_clone": "3357574",
-
venugopp →
committed 5aacadeb on 8.x-1.x authored by
yustinTR →
Issue #3357574 by yustinTR, Falco010, omkar_yewale, pasan.gamage,...
-
venugopp →
committed 5aacadeb on 8.x-1.x authored by
yustinTR →
- Status changed to Fixed
10 months ago 6:14am 29 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.