Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception when opening timepicker #205

Merged

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Sep 15, 2023

If you open a time picker (e.g. "startDate" in the event details), the ui crashes with an exception:
"Format string contains an unescaped latin alphabet character n ".

This fixes that by downgrading the date-fns dependency. Allegedly the issues is with material-ui not providing the correct types for date-fns, but downgrading material-ui would cause more problems.

If you open a time picker (e.g. "startDate" in the event
details), the ui crashes with an exception:
"Format string contains an unescaped latin alphabet
character `n` ".

This fixes that by downgrading the date-fns dependency.
Allegedly the issues is with material-ui not providing
the correct types for date-fns, but downgrading material-ui
would cause more problems.
@Arnei Arnei added type:bug Something isn't working type:dependencies Pull requests that update a dependency file labels Sep 15, 2023
@Arnei Arnei mentioned this pull request Sep 15, 2023
@Arnei Arnei mentioned this pull request Dec 18, 2023
@gregorydlogan
Copy link
Member

I get the following when doing the final submit for scheduling an event

Uncaught runtime errors:
ERROR
Invariant failed: A state mutation was detected between dispatches, in the path 'workflows.workflows.1.configuration_panel_json.0.fieldset.0.value'.  This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)
invariant@http://localhost:3000/admin-ui/static/js/bundle.js:101231:9
./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js/createImmutableStateInvariantMiddleware/</</</<@http://localhost:3000/admin-ui/static/js/bundle.js:101374:20
measureTime@http://localhost:3000/admin-ui/static/js/bundle.js:101131:16
./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js/createImmutableStateInvariantMiddleware/</</<@http://localhost:3000/admin-ui/static/js/bundle.js:101370:22
./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js/createActionCreatorInvariantMiddleware/</</<@http://localhost:3000/admin-ui/static/js/bundle.js:101118:16
checkAcls@http://localhost:3000/admin-ui/static/js/bundle.js:28506:30
onClick@http://localhost:3000/admin-ui/static/js/bundle.js:28455:21
callCallback@http://localhost:3000/admin-ui/static/js/bundle.js:170821:18
invokeGuardedCallbackDev@http://localhost:3000/admin-ui/static/js/bundle.js:170865:20
invokeGuardedCallback@http://localhost:3000/admin-ui/static/js/bundle.js:170920:35
invokeGuardedCallbackAndCatchFirstError@http://localhost:3000/admin-ui/static/js/bundle.js:170934:29
executeDispatch@http://localhost:3000/admin-ui/static/js/bundle.js:174556:46
processDispatchQueueItemsInOrder@http://localhost:3000/admin-ui/static/js/bundle.js:174582:26
processDispatchQueue@http://localhost:3000/admin-ui/static/js/bundle.js:174593:41
dispatchEventsForPlugins@http://localhost:3000/admin-ui/static/js/bundle.js:174602:27
./node_modules/react-dom/cjs/react-dom.development.js/dispatchEventForPluginEventSystem/<@http://localhost:3000/admin-ui/static/js/bundle.js:174780:16
batchedEventUpdates$1@http://localhost:3000/admin-ui/static/js/bundle.js:186602:16
batchedEventUpdates@http://localhost:3000/admin-ui/static/js/bundle.js:170644:16
dispatchEventForPluginEventSystem@http://localhost:3000/admin-ui/static/js/bundle.js:174779:26
attemptToDispatchEvent@http://localhost:3000/admin-ui/static/js/bundle.js:172568:40
dispatchEvent@http://localhost:3000/admin-ui/static/js/bundle.js:172501:45
unstable_runWithPriority@http://localhost:3000/admin-ui/static/js/bundle.js:243997:16
runWithPriority$1@http://localhost:3000/admin-ui/static/js/bundle.js:177157:14
discreteUpdates$1@http://localhost:3000/admin-ui/static/js/bundle.js:186617:18
discreteUpdates@http://localhost:3000/admin-ui/static/js/bundle.js:170654:16
dispatchDiscreteEvent@http://localhost:3000/admin-ui/static/js/bundle.js:172471:22

@Arnei
Copy link
Member Author

Arnei commented Dec 21, 2023

Does not appear for me, although that might be because I only tested it after merging the main branch into this one. Could you clear your browser cache and test again?

@gregorydlogan gregorydlogan merged commit b9e5a08 into opencast:admin-ui-picard Jan 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants