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
Describe the bug
Sometimes the "previous" button used for paginations shows in the first page, and crashes with the following exception when clicked
org...rtregister.fhircore.mwcoreDev E FATAL EXCEPTION: main
Process: org.smartregister.fhircore.mwcoreDev, PID: 16413
java.lang.IllegalStateException: Can't call goToPreviousPage() if no preceding page is enabled
at com.google.android.fhir.datacapture.QuestionnaireViewModel.goToPreviousPage$datacapture_release(QuestionnaireViewModel.kt:483)
at com.google.android.fhir.datacapture.QuestionnaireFragment.onViewCreated$lambda$1(QuestionnaireFragment.kt:98)
at com.google.android.fhir.datacapture.QuestionnaireFragment.$r8$lambda$Uy3n-EtWjyq7ZdNYJNMoLcmE2DA(Unknown Source:0)
at com.google.android.fhir.datacapture.QuestionnaireFragment$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7448)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1218)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Component
SDC library
Expected behavior
Previous button shouldn't show up on the first page
Screenshots
Additional context
It seems to happen when the questionnaire has items (in our case, hidden) not marked with extension for page, coming before ones with page
Describe the bug
Sometimes the "previous" button used for paginations shows in the first page, and crashes with the following exception when clicked
Component
SDC library
Expected behavior
Previous button shouldn't show up on the first page
Screenshots
![](https://private-user-images.githubusercontent.com/12814349/338986178-940aaccb-e272-488f-a422-9bfb26448994.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5MDI1MTYsIm5iZiI6MTcyMzkwMjIxNiwicGF0aCI6Ii8xMjgxNDM0OS8zMzg5ODYxNzgtOTQwYWFjY2ItZTI3Mi00ODhmLWE0MjItOWJmYjI2NDQ4OTk0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDEzNDMzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2NjdlYjFkNmJjOTgyODA1OGNkMmU2Yjk3YTkxODJhNjQ1ZmRhMDU0YzQwN2FlYjMxODc2NTIzZmExMjMwYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TU1KmSMVe92BgLmz-Oz_N8olJiYClFT7OlraDrE0Z34)
Additional context
It seems to happen when the questionnaire has items (in our case, hidden) not marked with extension for page, coming before ones with page
example.json
Would you like to work on the issue?
Yes
The text was updated successfully, but these errors were encountered: