Replace the deprecated functions in nodeorder.module and nodeorder.install files:

  • db_select()
  • db_update()
  • db_add_field(), db_drop_index(), db_drop_field()
  • entityManager()
  • drupal_set_message()
CommentFileSizeAuthor
#116 nodeorder-3072720-116.patch6.86 KBalezu
#112 d9-update.patch17.09 KBkemsnake
#111 interdiff-109-111.txt1.13 KBmaacl
#111 d9-3072720-111.patch23.75 KBmaacl
#110 nodeorder_patch_drupal9-2-9.patch31.98 KBbyacoubi
#110 nodeorder_patch_drupal9-2-9.patch31.98 KBbyacoubi
#109 interdiff-108-109.txt2.26 KBmaacl
#109 d9-3072720-109.patch23.23 KBmaacl
#108 d9-3072720-108.patch22.12 KBmaacl
#108 interdiff-107-108.txt327 bytesmaacl
#107 interdiff-102-107.txt6.02 KBmaacl
#107 d9-3072720-107.patch22.12 KBmaacl
#102 d9-3072720-102.patch19.24 KBgurvan
#99 d9-3072720-99.patch18.94 KBsegi
#87 d9-3072720-87.patch18.73 KBxpersonas
#85 3072720-85.patch18.08 KBPooja Ganjage
#82 3072720-82.patch18.33 KBPooja Ganjage
#81 3072720-81.patch18.08 KBPooja Ganjage
#80 3072720-80.patch18.11 KBPooja Ganjage
#79 3072720-79.patch18.08 KBPooja Ganjage
#78 3072720-78.patch18.11 KBPooja Ganjage
#75 3072720-75.patch18.02 KBPooja Ganjage
#72 3072720-72.patch18.1 KBPooja Ganjage
#70 3072720_70.patch18.1 KBkapilv
#67 3072720-67.patch18.1 KBPooja Ganjage
#65 3072720-65.patch18.1 KBPooja Ganjage
#63 3072720-63.patch18.1 KBPooja Ganjage
#62 interdiff_3072720_59_60.txt22.33 KBkapilv
#61 3072720-60.patch18.73 KBmschudders
#60 3072720-59.patch4.36 KBmschudders
#58 3072720-58.patch20.55 KBmschudders
#55 interdiff_41-50.txt3.19 KBshaktik
#55 3072720-50.patch20.47 KBshaktik
#53 innerdiff_52-53.txt435 bytesmegha_kundar
#53 3072720-53.patch29.11 KBmegha_kundar
#52 innerdiff_50-52.txt5.98 KBmegha_kundar
#52 3072720-52.patch29.11 KBmegha_kundar
#50 interdiff_41-50.patch10.44 KBmeena.bisht
#50 d9-deprecated-3072720-50.patch26.24 KBmeena.bisht
#47 interdiff_41-46.txt3.96 KBmeena.bisht
#47 d9-deprecated-3072720-46.patch19.87 KBmeena.bisht
#45 d9-deprecated-3072720-10.patch19.87 KBmeena.bisht
#43 interdiff_41-43.txt1.07 KBmegha_kundar
#43 d9-deprecated-3072720-43.patch18.23 KBmegha_kundar
#41 d9-deprecated-3072720-41.patch17.65 KBmsuthars
#36 3072720-36.patch15.32 KBshaktik
#35 3072720-35.patch16.52 KBdavps
#33 3072720-33.patch16.52 KBdavps
#31 3072720-31.patch16.51 KBdavps
#29 3072720-29.patch16.62 KBdavps
#27 3072720-27.patch13.84 KBnikitagupta
#24 3072720-24.patch13.13 KBsuresh prabhu parkala
#22 3072720-22.patch16.85 KBsamvada_jain_m
#19 updated-3072720-19.patch16.52 KBsamvada_jain_m
#15 3072720-15.patch7.63 KBShreevasa Tantry
#10 3072720-10.patch4.17 KBvuil
#7 3072720-6-update-db_functions.patch2.33 KBvuil
#3 3072720-3.patch3.78 KBvuil

Issue fork nodeorder-3072720

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ilchovuchkov created an issue. See original summary.

vuil’s picture

Issue summary: View changes
vuil’s picture

StatusFileSize
new3.78 KB
vuil’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: 3072720-3.patch, failed testing. View results

vuil’s picture

Status: Needs work » Active
vuil’s picture

StatusFileSize
new2.33 KB
vuil’s picture

Issue summary: View changes
vuil’s picture

Issue summary: View changes
vuil’s picture

StatusFileSize
new4.17 KB
vuil’s picture

Issue summary: View changes
vuil’s picture

Someone to help with the following issues of Kernel Tests (install/uninstall) inside?

There was 2 errors:
1) Drupal\Tests\nodeorder\Kernel\NodeorderUninstallTest::testUninstall
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "user" entity type does not exist.

2) Drupal\Tests\nodeorder\Kernel\NodeorderInstallTest::testInstall
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "user" entity type does not exist.

Thank you in advance.

vuil’s picture

asya_asina’s picture

Title: Update the deprecated functions in nodeorder.module » Drupal 9 Deprecated Code Report for Node Order

I checked the code using drupal-check tools. And drupal-check showed follow results:

------ --------------------------------------------------------------------------
Line nodeorder.install
------ --------------------------------------------------------------------------
31 Call to deprecated function db_add_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call addField() on it. For example,
44 Call to deprecated function db_drop_index():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call dropIndex() on it. For example,
45 Call to deprecated function db_drop_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call dropField() on it. For example,
------ --------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------
Line nodeorder.module
------ -----------------------------------------------------------------------------------
43 Call to deprecated method getVocabularyId() of class Drupal\taxonomy\Entity\Term:
in drupal:8.?.? and is removed from drupal:9.0.0. Use
TermInterface::bundle() instead.
103 Call to deprecated method entityManager() of class Drupal:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.
113 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
125 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
134 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
142 Call to deprecated method entityManager() of class Drupal:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.
149 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
155 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
176 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
240 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
------ -----------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------
Line src/Access/NodeOrderAccess.php
------ -----------------------------------------------------------------------------------
70 Call to deprecated method getVocabularyId() of class Drupal\taxonomy\Entity\Term:
in drupal:8.?.? and is removed from drupal:9.0.0. Use
TermInterface::bundle() instead.
------ -----------------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/NodeOrderListBuilder.php
------ ----------------------------------------------------------------------
292 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ -------------------------------------------------------------------------
Line src/NodeOrderManager.php
------ -------------------------------------------------------------------------
60 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
68 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
82 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
96 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
127 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
180 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
212 Call to deprecated function db_query_range():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call queryRange() on it. For example,
273 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
320 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
337 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
------ -------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------------------
Line src/Tests/NodeorderCrudTest.php
------ -----------------------------------------------------------------------------------------------------------------
13 Class Drupal\nodeorder\Tests\NodeorderCrudTest extends deprecated class Drupal\taxonomy\Tests\TaxonomyTestBase:
in drupal:8.?.? and is removed from drupal:9.0.0.
Use \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase instead.
47 Call to method setUp() of deprecated class Drupal\taxonomy\Tests\TaxonomyTestBase:
in drupal:8.?.? and is removed from drupal:9.0.0.
Use \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase instead.
57 Call to deprecated function entity_create():
in drupal:8.0.0 and is removed from drupal:9.0.0. Use
The method overriding Entity::create() for the entity type, e.g.
\Drupal\node\Entity\Node::create() if the entity type is known. If the
entity type is variable, use the entity storage's create() method to
construct a new entity:
68 Call to deprecated function entity_create():
in drupal:8.0.0 and is removed from drupal:9.0.0. Use
The method overriding Entity::create() for the entity type, e.g.
\Drupal\node\Entity\Node::create() if the entity type is known. If the
entity type is variable, use the entity storage's create() method to
construct a new entity:
86 Call to deprecated function entity_get_form_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getFormDisplay() instead.
91 Call to deprecated function entity_get_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getViewDisplay() instead.
299 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
------ -----------------------------------------------------------------------------------------------------------------

------ ---------------------------------------------------------------------------
Line tests/src/Functional/NodeorderPermissionsTest.php
------ ---------------------------------------------------------------------------
Class Drupal\Tests\BrowserTestBase not found and could not be autoloaded.
------ ---------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------
Line tests/src/Kernel/NodeorderInstallTest.php
------ -----------------------------------------------------------------------------------------------------
Class Drupal\Tests\nodeorder\Kernel\NodeorderInstallTestBase not found and could not be autoloaded.
------ -----------------------------------------------------------------------------------------------------

------ --------------------------------------------------------------------------------
Line tests/src/Kernel/NodeorderInstallTestBase.php
------ --------------------------------------------------------------------------------
Class Drupal\KernelTests\KernelTestBase not found and could not be autoloaded.
------ --------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------
Line tests/src/Kernel/NodeorderUninstallTest.php
------ -----------------------------------------------------------------------------------------------------
Class Drupal\Tests\nodeorder\Kernel\NodeorderInstallTestBase not found and could not be autoloaded.
------ -----------------------------------------------------------------------------------------------------

Shreevasa Tantry’s picture

Status: Active » Needs review
StatusFileSize
new7.63 KB

updated patch. Please review.

vuil’s picture

Status: Needs review » Reviewed & tested by the community

The patch of #15 works fine and fixes the issue. I set the issue status to Reviewed & tested by the community.

davps’s picture

Status: Reviewed & tested by the community » Needs work

Patch #15 contains errors that will cause exceptions

vuil’s picture

@davps Could you post the raised exceptions (and/or screenshot)?
Thank you.

samvada_jain_m’s picture

StatusFileSize
new16.52 KB

Please review the patch.

samvada_jain_m’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 19: updated-3072720-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

samvada_jain_m’s picture

Status: Needs work » Needs review
StatusFileSize
new16.85 KB

Status: Needs review » Needs work

The last submitted patch, 22: 3072720-22.patch, failed testing. View results

suresh prabhu parkala’s picture

Status: Needs work » Needs review
StatusFileSize
new13.13 KB

Please review!

vuil’s picture

Status: Needs review » Needs work
nikitagupta’s picture

Assigned: Unassigned » nikitagupta
nikitagupta’s picture

Status: Needs work » Needs review
StatusFileSize
new13.84 KB

Fixed the test cases.

nikitagupta’s picture

Assigned: nikitagupta » Unassigned
davps’s picture

StatusFileSize
new16.62 KB

Here is a combined patch from all comments and with few additional fixes according to phpcs output.

Status: Needs review » Needs work

The last submitted patch, 29: 3072720-29.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

davps’s picture

Status: Needs work » Needs review
StatusFileSize
new16.51 KB

Status: Needs review » Needs work

The last submitted patch, 31: 3072720-31.patch, failed testing. View results

davps’s picture

Status: Needs work » Needs review
StatusFileSize
new16.52 KB

Status: Needs review » Needs work

The last submitted patch, 33: 3072720-33.patch, failed testing. View results

davps’s picture

StatusFileSize
new16.52 KB
shaktik’s picture

Status: Needs work » Needs review
StatusFileSize
new15.32 KB

#35 no longer to applies so i have re-rolled #35 patch kindly check .

Status: Needs review » Needs work

The last submitted patch, 36: 3072720-36.patch, failed testing. View results

msuthars’s picture

Assigned: Unassigned » msuthars
shaktik’s picture

Hey @msuthars are you still working on this?

msuthars’s picture

@shaktik Yes I'm I working on it. I fixed the #36 test case issue. But stuck in other test case issues.

msuthars’s picture

Assigned: msuthars » Unassigned
Status: Needs work » Needs review
StatusFileSize
new17.65 KB

Fixed the testcase issues, Updated the patch. Please review.

Status: Needs review » Needs work

The last submitted patch, 41: d9-deprecated-3072720-41.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

megha_kundar’s picture

Status: Needs work » Needs review
StatusFileSize
new18.23 KB
new1.07 KB

Status: Needs review » Needs work

The last submitted patch, 43: d9-deprecated-3072720-43.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

meena.bisht’s picture

Assigned: Unassigned » meena.bisht
Status: Needs work » Needs review
StatusFileSize
new19.87 KB

adding patch.

Status: Needs review » Needs work

The last submitted patch, 45: d9-deprecated-3072720-10.patch, failed testing. View results

meena.bisht’s picture

StatusFileSize
new19.87 KB
new3.96 KB

Attching corrct comment number and interdiff

meena.bisht’s picture

Assigned: meena.bisht » Unassigned
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 47: d9-deprecated-3072720-46.patch, failed testing. View results

meena.bisht’s picture

Status: Needs work » Needs review
StatusFileSize
new26.24 KB
new10.44 KB
megha_kundar’s picture

Assigned: Unassigned » megha_kundar
megha_kundar’s picture

StatusFileSize
new29.11 KB
new5.98 KB
megha_kundar’s picture

StatusFileSize
new29.11 KB
new435 bytes

Status: Needs review » Needs work

The last submitted patch, 53: 3072720-53.patch, failed testing. View results

shaktik’s picture

Status: Needs work » Needs review
StatusFileSize
new20.47 KB
new3.19 KB

sorry Megha_kundar,

fixed testcase, kindly check.

megha_kundar’s picture

Assigned: megha_kundar » Unassigned
Status: Needs review » Needs work
megha_kundar’s picture

Status: Needs work » Needs review

Sorry by mistake

mschudders’s picture

StatusFileSize
new20.55 KB

new patch, fixed a few things so the basic functionality works again.

Status: Needs review » Needs work

The last submitted patch, 58: 3072720-58.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mschudders’s picture

StatusFileSize
new4.36 KB

reverting tests done in patch #55 to the default state on this branch.
Changes done in #55 can't work.

mschudders’s picture

StatusFileSize
new18.73 KB

my bad, previous patch was a patch from #55 to #59
Attached the full patch

kapilv’s picture

StatusFileSize
new22.33 KB
Pooja Ganjage’s picture

StatusFileSize
new18.1 KB

Hi,

Creating patch for #61 comment failed case.

Please review the patch.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
Pooja Ganjage’s picture

StatusFileSize
new18.1 KB

Status: Needs review » Needs work

The last submitted patch, 65: 3072720-65.patch, failed testing. View results

Pooja Ganjage’s picture

StatusFileSize
new18.1 KB
Pooja Ganjage’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 67: 3072720-67.patch, failed testing. View results

kapilv’s picture

Status: Needs work » Needs review
StatusFileSize
new18.1 KB

Status: Needs review » Needs work

The last submitted patch, 70: 3072720_70.patch, failed testing. View results

Pooja Ganjage’s picture

StatusFileSize
new18.1 KB
Pooja Ganjage’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 72: 3072720-72.patch, failed testing. View results

Pooja Ganjage’s picture

StatusFileSize
new18.02 KB
Pooja Ganjage’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 75: 3072720-75.patch, failed testing. View results

Pooja Ganjage’s picture

StatusFileSize
new18.11 KB
Pooja Ganjage’s picture

StatusFileSize
new18.08 KB
Pooja Ganjage’s picture

StatusFileSize
new18.11 KB
Pooja Ganjage’s picture

StatusFileSize
new18.08 KB
Pooja Ganjage’s picture

StatusFileSize
new18.33 KB
Pooja Ganjage’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 82: 3072720-82.patch, failed testing. View results

Pooja Ganjage’s picture

StatusFileSize
new18.08 KB
willempje2’s picture

I think

$container->get('entity.manager')->getStorage($entity_type->id()),
https://git.drupalcode.org/project/nodeorder/-/blob/8.x-1.x/src/NodeOrde...

Should be:

$container->get('entity_type.manager')->getStorage($entity_type->id()),

EntityManager::getStorage is removed from drupal:9.0.0.

xpersonas’s picture

StatusFileSize
new18.73 KB

Yep. I updated that (getStorage) deprecation and the db_query_range deprecation. See patch below. I just tacked those two on to what Pooja already did. She basically did all the work. Thank you!

xpersonas’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 87: d9-3072720-87.patch, failed testing. View results

esod made their first commit to this issue’s fork.

davps’s picture

Thank you all for helping with this issue. I'll apply all suggested changes in new merge request, feel free to add your changes in the forked branch.

xpersonas’s picture

@davps - I created another issue with a patch. Since it's D9/PHP8 related, I thought it made sense to add a merge request to this fork. Please correct me if I'm wrong.

TypeError: PDOStatement::fetchAll(): Argument #2 must be of type int, string given in PDOStatement->fetchAll()
https://www.drupal.org/project/nodeorder/issues/3208010

Still getting used to the new Gitlab workflow. Sorry if I confused anything. This module is super essential to our site so I want to help in any way I can.

segi made their first commit to this issue’s fork.

segi’s picture

StatusFileSize
new18.94 KB

I upload a new patch after some changes in dev branch. It's more secure to pull that patch from here because it represents a state of the code.

  • davps committed 087943a on 8.x-1.x
    Issue #3072720: Update core requirements
    

  • davps committed 6b04195 on 8.x-1.x
    Revert "Issue #3072720: Update core requirements"
    
    This reverts commit...
gurvan’s picture

StatusFileSize
new19.24 KB
vuil’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 102: d9-3072720-102.patch, failed testing. View results

bygeoffthompson’s picture

I need to keep NodeOrder on a site I manage that is updating to Drupal 9 this week.

I downgraded to the develop branch of this project, applied patch #102, and that has NodeOrder Drupal 9 ready according to the Upgrade Status module. The patch was tested and is successful.

Thanks

ralkeon’s picture

I can't get this working, the patch doesn't change anything cause the compatibility check is done before the module gets patched (and dev module will always be reinstalled).

I saw in commits that the module was updated to "d9 ready" and then reverted here . It needs more work?

maacl’s picture

StatusFileSize
new22.12 KB
new6.02 KB

I can't get this working, the patch doesn't change anything cause the compatibility check is done before the module gets patched (and dev module will always be reinstalled).

This could help: https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient...

I saw in commits that the module was updated to "d9 ready" and then reverted here . It needs more work?

There are failing tests, so we need to fix this.

I looked through some of the patches and used drupal-check and rector locally, and I think in #102 are changes which are not intended. So I will attach my attempt at this, and we will see what the tests have to say.

maacl’s picture

StatusFileSize
new327 bytes
new22.12 KB

Hm, I can't get the tests to run against D9. Another try...

Or is there something wrong with the settings of this project?

maacl’s picture

StatusFileSize
new23.23 KB
new2.26 KB

I tried to get the tests to run on my machine, and found some more things to fix. Unfortunately I got stuck with this error:

Drupal\nodeorder\Tests\NodeorderCrudTest::testOrderableVocabulary
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1 no such column: nid: CREATE TABLE "test70184082"."taxonomy_index_0" (
"weight" INTEGER NOT NULL DEFAULT 0, 
 PRIMARY KEY (nid, tid)
); Array
(
)
/var/www/html/drupal/core/lib/Drupal/Core/Database/ExceptionHandler.php:79
/var/www/html/drupal/core/lib/Drupal/Core/Database/Connection.php:911
/var/www/html/drupal/core/lib/Drupal/Core/Database/Schema.php:618
/var/www/html/drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php:429
/var/www/html/drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php:398
/var/www/html/drupal/modules/contrib/nodeorder/nodeorder.install:31
/var/www/html/drupal/core/lib/Drupal/Core/Extension/ModuleHandler.php:392
/var/www/html/drupal/core/lib/Drupal/Core/Extension/ModuleInstaller.php:343
/var/www/html/drupal/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/var/www/html/drupal/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:474
/var/www/html/drupal/core/tests/Drupal/Tests/BrowserTestBase.php:562
/var/www/html/drupal/core/tests/Drupal/Tests/BrowserTestBase.php:381
/var/www/html/drupal/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php:28
/var/www/html/drupal/modules/contrib/nodeorder/src/Tests/NodeorderCrudTest.php:50

I am not sure what is happening, and why the table is "taxonomy_index_0". I did not find any examples of a module adding a index to a table either, so not sure if the code is still correct for D9.

byacoubi’s picture

Hello
I created this patch for drupal 9
This patch work very well for me.
thanks.

maacl’s picture

StatusFileSize
new23.75 KB
new1.13 KB

@byacoubi Thanks. Unfortunately your patch does not apply against the dev-version of the module.

> I think in #102 are changes which are not intended.

This assumption was wrong, I have it now integrated in my patch. Using this version now in my projects.

kemsnake’s picture

StatusFileSize
new17.09 KB
proweb.ua’s picture

#112 in dev version

patch -p1 < d9-update.patch
patching file nodeorder.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file nodeorder.info.yml.rej
patching file src/NodeOrderManager.php
Hunk #4 FAILED at 70.
Hunk #5 FAILED at 78.
Hunk #6 FAILED at 92.
Hunk #7 FAILED at 106.
Hunk #8 FAILED at 137.
Hunk #11 FAILED at 190.
Hunk #13 FAILED at 278.
Hunk #14 FAILED at 331.
Hunk #15 FAILED at 348.
9 out of 15 hunks FAILED -- saving rejects to file src/NodeOrderManager.php.rej
patching file nodeorder.module
Hunk #1 succeeded at 9 with fuzz 2.
Hunk #2 succeeded at 39 (offset 1 line).
Hunk #3 succeeded at 89 (offset 1 line).
Hunk #4 FAILED at 99.
1 out of 4 hunks FAILED -- saving rejects to file nodeorder.module.rej
patching file src/NodeOrderManagerInterface.php
patching file src/Access/NodeOrderAccess.php
patching file src/Tests/NodeorderCrudTest.php
Hunk #4 FAILED at 160.
Hunk #5 FAILED at 199.
Hunk #6 FAILED at 255.
Hunk #7 FAILED at 298.
Hunk #8 succeeded at 313 (offset 1 line).
4 out of 8 hunks FAILED -- saving rejects to file src/Tests/NodeorderCrudTest.php.rej
patching file nodeorder.install

in beta2

patching file nodeorder.info.yml
patching file src/NodeOrderManager.php
patching file nodeorder.module
patching file src/NodeOrderManagerInterface.php
patching file src/Access/NodeOrderAccess.php
patching file src/Tests/NodeorderCrudTest.php
patching file nodeorder.install

after click install:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "nodeorder.manager" has a dependency on a non-existent service "entity.manager". in Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() (line 86 of vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php).
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, ) (Line: 49)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array) (Line: 91)
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Object, 1) (Line: 49)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object, 1) (Line: 82)
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, 1) (Line: 49)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array, 1) (Line: 46)
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process(Object) (Line: 40)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->process(Object) (Line: 94)
Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 762)
Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1295)
Drupal\Core\DrupalKernel->compileContainer() (Line: 900)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 821)
Drupal\Core\DrupalKernel->updateModules(Array, Array) (Line: 617)
Drupal\Core\Extension\ModuleInstaller->updateKernel(Array) (Line: 241)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 476)
Drupal\system\Form\ModulesListForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

renew’s picture

@proweb.ua Same problem over here.

It doesn't seem a very active subject over here. So does anybody found a good replacement for this module? I hoped Entityqueue would be a good replacement, but I can't make it do what this module does...

dcdenison’s picture

Haven't been able to find a good replacement either.

alezu’s picture

StatusFileSize
new6.86 KB

OK, I think it's time to continue this work again. I've adapted the code along to Drupal 9.3 and it seems working.

alezu’s picture

Status: Needs work » Needs review
dcdenison’s picture

Thank you Alezu! This is a valuable module.

artis.bajars’s picture

Any chance we could get a 9.x branch / 9.x-dev version going? Otherwise the only way to install this upgrade via composer is to use Drupal's lenient endpoint and then patch it.

dcdenison’s picture

Would love to see a 9.x branch / 9.x-dev version.

nelo_drup’s picture

Any news about this module I was trying to apply the patches but I can't find any specific order

alorenc’s picture

I can see that a lot of work has been already done but nothing has been committed.
I am happy to help with creation of d9 version. Do we have any active maintainer in this project?

dcdenison’s picture

Not a developer, but willing to help any way I can.

dcdenison’s picture

Could Node Weight replace Node Order?

https://www.drupal.org/project/node_weight

Are there other modules that people are using instead of Node Order?

xpersonas’s picture

Is it safe to say this module is no longer maintained? There's no D8 version on the release page. The last D8 beta was created on May 2, 2018.

I find this module immensely useful and use it on my most of my larger sites even to this day.

I'm curious what we do now? I'd like to see this module kept up to date. What would be best? Do we just use the fork forever? Can we become maintainers somehow? Just want to see this module continue. I don't think there's a viable alternative, and I don't want to pollute the module list with a clone of this module with a different name.

What do we do?

xpersonas’s picture

Ok, I find this module absolutely necessary on quite a few sites. It was hard enough with Drupal 9, but now that I'm updating to Drupal 10...

I went ahead and created a new module. I'm going to use it to cater to Drupal 9 and 10 only. It's mostly an updated copy of this module's current state (right now), updated to work with Drupal 10 and renamed as to not cause conflicts.

https://www.drupal.org/project/node_order_by_term

Feel free to open up issues, request to co-maintain, etc.. Or maybe I just use it. Either way. I just need this module working on my Drupal 10 upgrade, and I feel like this is going to be the easiest route.

lahoosascoots’s picture

I believe there is an official way of becoming a maintainer of an abandoned project. I can’t quite find it but I’ve seen it somewhere. Maybe ask in the Drupal Slack?

alezu’s picture

@xpersonas, wouldnt't it be better for you to request for a maintainer role for this module?

xpersonas’s picture

I would be happy to become a maintainer for this project. But I don't feel like the maintainers are responding. If there's a way to do that for an abandoned project, I'm not aware of it. The original authors and maintainers did a great job with this module. I just need something stable going forward. I can remove my project or keep it private if it causes conflict or this module gets updated.

alezu’s picture

@xpersonas there is a way, described here:
https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...
You will be interested in point #6.

xpersonas’s picture

Project: Node Order » Drupal.org project ownership
Version: 8.x-1.x-dev »
Component: Code » Maintaining offer

I'm offering to update and maintain this module.
https://www.drupal.org/project/nodeorder

gisle’s picture

Project: Drupal.org project ownership » Node Order
Version: » 8.x-1.x-dev
Component: Maintaining offer » Code
Category: Task » Feature request

xpersonas, if you're interested in becoming a maintainer of Node Order, you need to follow the procedure outlined here: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...

Hijacking an existing issue created for a different purpose is not the right way to do this.

Moving back to the project's own issue queue.

If you open a new issue offering to maintain, remember to PM the owner marcp and record the date you sent the PM in the issue summary of the new issue you create. It may be a good idea to PM all the maintainers as well, as they can add you to the team.

xpersonas’s picture

LOL. Well, I'm failing. I guess I misunderstood the instructions. I jumped straight to #6. Trying to be helpful, but I think I'm doing the opposite. Apologies to everyone. If only I could delete all my posts here.

renew’s picture

@xpersonas Your work and help is much appreciated! After waiting for a long time, trying to find other modules that works, while ignoring the mails telling me I have an unsupported module in my project, it would be great if this module would be alive again!
So thanks again for your efforts!

xpersonas’s picture

Thanks @ReneW. I appreciate that. Yeah just trying to do this the right way. I made a new issue asking to be a maintainer or co-maintainer. I think I have to wait 2 weeks before I can request ownership through drupal.org. So that's what I'm going to try.

davps’s picture

Hello everyone, I'll take a look patches at the weekend.

Next time for quick feedback send message in slack. thanks in advance.

  • alorenc committed b7cd50a8 on 8.x-1.x
    Issue #3072720: Allow to install on d9
    

  • alorenc committed 49f49b4c on 8.x-1.x
    Issue #3072720: Allow to select vocabularies.
    
xpersonas’s picture

Dev version has been updated and should be compatible with Drupal 9 now.

davps changed the visibility of the branch nodeorder-3072720 to hidden.

davps’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Fixed

I am closing the task due to the fact that all the changes have been merged into the 2x branch. Thank you all for your help.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.