This issue is created to separately track the D10 compatibility
so that the actions here do not interfere with the automated patches at
https://www.drupal.org/project/vote_up_down/issues/3299469

As part of this issue:

  • 1. Will check the module compatibility with drupal 10 (before and after applying the auto-bot patch) using the Upgrade-statue module scan.
  • 2. Will check the depreciated method(if any) after the patch is applied.
  • 3. Will provide the patch to solve the errors if any for the module
  • 4. Will finally check the module installed and working on the drupal 10 instance.
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

akshaydalvi212 created an issue. See original summary.

akshaydalvi212’s picture

Hello,

Thanks for the patch,
Before applying the patch, we were facing the below errors for drupal 10 compatibilities:

After applying the patch, we still facing some errors for drupal 10 compatibilities

I m working on the same and providing a patch, which will eliminate the remaining error for drupal 10 compatibilities.

Thanks and regards

akshaydalvi212’s picture

Hello,

Providing the primarily patch, which eliminates the above-mentioned errors from
the result of the scan from the upgrade status for drupal 10 compatibilities.

The module gets installed on the drupal 10 with votingapi module

but, while using the vote up and down field in the content type the site breaks with the following error:

The website encountered an unexpected error. Please try again later.

Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 140 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 69)
Drupal\vud\Plugin\VoteUpDownWidgetBase->build(Object) (Line: 28)
Drupal\vud\Plugin\Field\FieldFormatter\VoteUpDownFormatterType->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 339)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 281)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 238)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 237)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 157)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 670)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Hence shifting the issue status to Needs work.

Thanks and regards

kristen pol’s picture

Assigned: akshaydalvi212 » Unassigned
Category: Plan » Task
Status: Active » Needs work

Thanks for participating in porting day!

While technically you can add custom patches to the bot issue, it's fine this has been split out and you were clear on the other issue and linked to here which is good.

Moving to needs work based on the error. And un-assigning since that was 12 hours ago. Feel free to reassign if you will be working on it further.

kristen pol’s picture

Linking the other direction too.

ameymudras’s picture

StatusFileSize
new2.83 KB
new671 bytes

This module requires voting api module to be compatible first before testing this module. I have fixed issue mentioned in #3 and I've uploaded a patch for the same but the module is not completely functional at the moment.

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

kristen pol’s picture

Working during porting day.

@ameymudras Was the problem with the module the same as what is noted in #3?

sreenivasparuchuri’s picture

StatusFileSize
new2.83 KB

in the added patch module \Drupal::moduleHandler()->loadInclude is written in wrong way due to this vud.theme.inc not loading

Before:
\Drupal::moduleHandler()->loadInclude('inc', 'vud', 'vud.theme');
After
\Drupal::moduleHandler()->loadInclude('vud','inc', 'vud.theme');

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

sametyaman’s picture

Is there any problem in creating the below branch? I plan to commit to this branch to solve errors related to Drupal 10.

https://git.drupalcode.org/issue/vote_up_down-3300684/-/tree/10.x.1.x

@sreenivasparuchuri I used your d9 updates with cherry-picking. Thank you additionally for your contributions.

effortdee’s picture

Any update on this being stable for D10?

steven jones’s picture

We have been using the patch in comment #9 for several years without issue.

I will note that we're using a custom VoteUpDownWidget, and thus, the ones provided by the module, which haven't really been ported to recent versions of Voting API still need porting.

steven jones changed the visibility of the branch 10.x.1.x to hidden.

steven jones’s picture

Status: Needs work » Reviewed & tested by the community

This works well enough to get at least an alpha release out I reckon.

I've checked, and on my site, all the widgets work in some way, and it's generally doing what I want it to do.

I think the 100 users of vote up down module 8.x are going to be fine with this change I reckon.

  • marvil07 committed ce1f41d3 on 8.x-1.x
    Issue #3300684: Make it compatible with D10
    
    By: akshaydalvi212
    By:...
marvil07’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the collaboration here 🙌️

There may be more thing to go, but the minimal changes are in place, closing now.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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