File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/core/admin/components/EditForm Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " strapi-plugin-webtools " : patch
3+ ---
4+
5+ fix: pass the locale to the URL alias update request to prevent issues
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const EditForm = () => {
2929 const urlParams = new URLSearchParams ( window . location . search ) ;
3030 const locale = urlParams . get ( 'plugins[i18n][locale]' ) ;
3131 const aliases = useQuery ( `aliases-${ model } -${ id } -${ locale } ` , async ( ) => get < UrlAliasEntity [ ] > ( `/webtools/url-alias/findFrom?model=${ model } &documentId=${ id } &locale=${ locale } ` ) ) ;
32- const mutation = useMutation ( ( updatedAlias : Partial < UrlAliasEntity > ) => put ( `/webtools/url-alias/update/${ aliases . data . data [ 0 ] . documentId } ` , {
32+ const mutation = useMutation ( ( updatedAlias : Partial < UrlAliasEntity > ) => put ( `/webtools/url-alias/update/${ aliases . data . data [ 0 ] . documentId } ${ locale ? `?locale= ${ locale } ` : '' } ` , {
3333 data : updatedAlias ,
3434 } ) ) ;
3535
You can’t perform that action at this time.
0 commit comments