You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened instead: disableAuthentication does not work for <Show/> components. It throws the following error in the console:
React does not recognize the `disableAuthentication` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableauthentication` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Post list, show, edit and create view modes, as well as Comments list and show all have the disableAuthentication prop.
Removed the mobile friendly UI for easier testing
How to trigger the issue:
Logout then go back to the index page: the posts list should display.
Try to click on a post to show it. It works because it uses the useShowController instead of the <Show/> component.
Try to edit or create new posts. It works.
Try to open the comments list and click on show for one of the items. It redirects to the login page because this view uses the <Show/> component.
Environment
React-admin version: 4.1.3
Last version that did not exhibit the issue (if applicable):
React version: 17.0.1
Browser: Firefox
Stack trace (in case of a JS error):
Warning: React does not recognize the `disableAuthentication` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableauthentication` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
div
./node_modules/@emotion/react/dist/emotion-element-cbed451f.browser.esm.js/withEmotionCache/<@https://zeedw3.sse.codesandbox.io/index.bundle.js:590:66
./node_modules/ra-ui-materialui/dist/esm/index.js/kr<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111181:825
./node_modules/ra-core/dist/esm/index.js/le<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110598:5063
./node_modules/ra-core/dist/esm/index.js/wa<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110598:33648
./node_modules/ra-core/dist/esm/index.js/Bv<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110598:33876
./node_modules/ra-ui-materialui/dist/esm/index.js/Ek<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111181:2877
CommentShow
Routes@https://zeedw3.sse.codesandbox.io/index.bundle.js:148046:7
./node_modules/ra-core/dist/esm/index.js/ce<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110591:8079
./node_modules/ra-core/dist/esm/index.js/Jn<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110591:8263
Routes@https://zeedw3.sse.codesandbox.io/index.bundle.js:148046:7
ErrorBoundary@https://zeedw3.sse.codesandbox.io/index.bundle.js:140349:37
div
main
div
div
./node_modules/@emotion/react/dist/emotion-element-cbed451f.browser.esm.js/withEmotionCache/<@https://zeedw3.sse.codesandbox.io/index.bundle.js:590:66
./node_modules/ra-ui-materialui/dist/esm/index.js/Hc<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111167:72144
__WEBPACK_DEFAULT_EXPORT__
div
Routes@https://zeedw3.sse.codesandbox.io/index.bundle.js:148046:7
./node_modules/ra-core/dist/esm/index.js/lo<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110591:3978
Routes@https://zeedw3.sse.codesandbox.io/index.bundle.js:148046:7
./node_modules/ra-core/dist/esm/index.js/Hn<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110591:6453
./node_modules/ra-ui-materialui/dist/esm/index.js/eD<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111204:7423
InnerThemeProvider@https://zeedw3.sse.codesandbox.io/index.bundle.js:40137:70
ThemeProvider@https://zeedw3.sse.codesandbox.io/index.bundle.js:39850:7
ThemeProvider@https://zeedw3.sse.codesandbox.io/index.bundle.js:40159:7
./node_modules/ra-ui-materialui/dist/esm/index.js/Qc<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111167:82114
./node_modules/ra-core/dist/esm/index.js/kn<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:56098
./node_modules/ra-core/dist/esm/index.js/Ho<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:8289
./node_modules/ra-core/dist/esm/index.js/At<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:8863
Router@https://zeedw3.sse.codesandbox.io/index.bundle.js:147984:7
No@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:767
./node_modules/ra-core/dist/esm/index.js/ps<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:1826
./node_modules/ra-core/dist/esm/index.js/Uo<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:1256
./node_modules/ra-core/dist/esm/index.js/jo<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:1393
QueryClientProvider@https://zeedw3.sse.codesandbox.io/index.bundle.js:146044:16
./node_modules/ra-core/dist/esm/index.js/zo<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:7050
./node_modules/ra-core/dist/esm/index.js/uo<@https://zeedw3.sse.codesandbox.io/index.bundle.js:110590:56811
./node_modules/ra-ui-materialui/dist/esm/index.js/oD<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111204:7855
./node_modules/react-admin/dist/esm/index.js/M<@https://zeedw3.sse.codesandbox.io/index.bundle.js:111755:498
The text was updated successfully, but these errors were encountered:
What you were expecting:
disableAuthentication
should work for all components.What happened instead:
disableAuthentication
does not work for<Show/>
components. It throws the following error in the console:Steps to reproduce:
authProvider
disableAuthentication
prop to a<Show/>
component.Related code:
Here is a sandbox forked from the simple v4 example: https://codesandbox.io/s/stupefied-volhard-zeedw3
Changes:
disableAuthentication
prop.How to trigger the issue:
useShowController
instead of the<Show/>
component.<Show/>
component.Environment
The text was updated successfully, but these errors were encountered: