SharePoint / SharePoint/sp-dev-docs
Unable to retrieve list items from the SharePoint site after updating the list name
@Ashlesha-MSFT is already working on this.
Since Feb 13, 2026.
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
"@microsoft/sp-core-library": "1.21.1",
"@microsoft/sp-lodash-subset": "1.21.1",
"@microsoft/sp-office-ui-fabric-core": "1.21.1",
"@microsoft/sp-property-pane": "1.21.1",
"@microsoft/sp-webpart-base": "1.21.1",
"@pnp/logging": "^4.17.0",
"@pnp/sp": "^4.17.0",
Describe the bug / error
We created a SharePoint site collection with Polish set as the default language.
After that, we created a SharePoint list named “My List Data.”
We also developed an SPFx project for customization and implemented the following code to retrieve data from this SharePoint list.
import { spfi, SPFI, SPFx } from '@pnp/sp';
import '@pnp/sp/items';
import '@pnp/sp/lists';
import '@pnp/sp/webs';
const sp: SPFI = getSP();
const listData = await sp.web.lists.getByTitle("My List Data").items.select("*").top(5000);
console.log("listData:", listData);
Due to certain requirements, we needed to change the list name from “My List Data” to “My_List_Data”.
Accordingly, we have updated the code as shown below.
import { spfi, SPFI, SPFx } from '@pnp/sp';
import '@pnp/sp/items';
import '@pnp/sp/lists';
import '@pnp/sp/webs';
const sp: SPFI = getSP();
const listData = await sp.web.lists.getByTitle("My_List_Data").items.select("*").top(5000);
console.log("listData:", listData);
After renaming the list and updating the code accordingly, we are now facing the following issue.
"List 'My_List_Data' does not exist at site with URL 'https://contoso.sharepoint.com/sites/contoso'."
We have verified that the list already exists with the title “My_List_Data”.
Steps to reproduce
After renaming the list and updating the code accordingly, we are now facing the following issue.
"List 'My_List_Data' does not exist at site with URL 'https://contoso.sharepoint.com/sites/contoso'."
We have verified that the list already exists with the title “My_List_Data”.
Expected behavior
The behavior should remain consistent across all site collections and should not depend on any specific language settings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.