Skip to content

Conversation

@alicanerdurmaz
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

useGetToPath returns undefined when a partial resource object is passed as parameter. This happens because the hook uses the passed resource directly without looking up the full resource definition from the resources array.

What is the new behavior?

The hook now looks up the full resource definition from the resources array using the resource name. This ensures all action routes are available even when a partial resource object is provided.

Also added a warning message when an action route cannot be found.

fixes #7159

Notes for reviewers

Added a new test case to cover the scenario where a partial resource is passed but the full definition should be found from the resources array.

@alicanerdurmaz alicanerdurmaz requested a review from a team as a code owner December 16, 2025 07:47
@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

🦋 Changeset detected

Latest commit: 0a9c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@refine-bot refine-bot temporarily deployed to deploy-preview-website-7163 December 16, 2025 08:04 Inactive
@cypress
Copy link

cypress bot commented Dec 16, 2025

refine    Run #12385

Run Properties:  status check errored Errored #12385  •  git commit bdc9d51f4b ℹ️: Merge 0a9c8955aef278bd2658f0bda207a75b60c798aa into b183077db3b5dd6ad82ab2ca0bf9...
Project refine
Branch Review fix/use-get-to-path-returns-undefined
Run status status check errored Errored #12385
Run duration 22m 14s
Commit git commit bdc9d51f4b ℹ️: Merge 0a9c8955aef278bd2658f0bda207a75b60c798aa into b183077db3b5dd6ad82ab2ca0bf9...
Committer Alican Erdurmaz
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 22
Tests that did not run due to a failure in a mocha hook  Skipped 2
Tests that passed  Passing 375
View all changes introduced in this branch ↗︎

@alicanerdurmaz alicanerdurmaz force-pushed the fix/use-get-to-path-returns-undefined branch from fbf4935 to 1bf3f1e Compare December 16, 2025 08:23
@BatuhanW BatuhanW merged commit add2f6f into main Dec 29, 2025
95 of 98 checks passed
@BatuhanW BatuhanW deleted the fix/use-get-to-path-returns-undefined branch December 29, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] useGetToPath is not working

4 participants