Skip to content

#12237: fix the background selector show an error in console#12242

Merged
MV88 merged 2 commits into
geosolutions-it:masterfrom
mahmoudadel54:issue_12237
Apr 23, 2026
Merged

#12237: fix the background selector show an error in console#12242
MV88 merged 2 commits into
geosolutions-it:masterfrom
mahmoudadel54:issue_12237

Conversation

@mahmoudadel54
Copy link
Copy Markdown
Contributor

@mahmoudadel54 mahmoudadel54 commented Apr 10, 2026

Description

This PR includes resolving "Cannot update during an existing state transition" console error in BackgroundSelector. It includes:

  • Refactored BackgroundSelector.jsx
  • Moved the logic for detecting and adding the missing Ellipsoid terrain from the main function body into a React.useEffect hook

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#12237

What is the new behavior?

The console error of background selector has been gone, resolved by the fix.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

…onsole

Description:
- Refactored BackgroundSelector.jsx
- Moved the logic for detecting and adding the missing Ellipsoid terrain from the main function body into a React.useEffect hook
Comment thread web/client/components/background/BackgroundSelector.jsx Outdated
…seEffect in web/client/components/background/BackgroundSelector.jsx file
@mahmoudadel54 mahmoudadel54 requested a review from MV88 April 23, 2026 13:48
@MV88 MV88 merged commit 32f9ee3 into geosolutions-it:master Apr 23, 2026
12 checks passed
@offtherailz
Copy link
Copy Markdown
Member

Successfully created backport PR for 2026.01.xx:

offtherailz added a commit that referenced this pull request Apr 24, 2026
…#12297)

* #12237: fix the background selector show an error in console
Description:
- Refactored BackgroundSelector.jsx
- Moved the logic for detecting and adding the missing Ellipsoid terrain from the main function body into a React.useEffect hook

* - resolve review comment of import useEffect instead of using React.useEffect in web/client/components/background/BackgroundSelector.jsx file

(cherry picked from commit 32f9ee3)

Co-authored-by: mahmoud adel <58145645+mahmoudadel54@users.noreply.github.com>
Brice150 pushed a commit to Brice150/MapStore2 that referenced this pull request May 18, 2026
…onsole (geosolutions-it#12242)

* geosolutions-it#12237: fix the background selector show an error in console
Description:
- Refactored BackgroundSelector.jsx
- Moved the logic for detecting and adding the missing Ellipsoid terrain from the main function body into a React.useEffect hook

* - resolve review comment of import useEffect instead of using React.useEffect in web/client/components/background/BackgroundSelector.jsx file
huntsmarinho pushed a commit to huntsmarinho/MapStore2 that referenced this pull request May 31, 2026
…onsole (geosolutions-it#12242)

* geosolutions-it#12237: fix the background selector show an error in console
Description:
- Refactored BackgroundSelector.jsx
- Moved the logic for detecting and adding the missing Ellipsoid terrain from the main function body into a React.useEffect hook

* - resolve review comment of import useEffect instead of using React.useEffect in web/client/components/background/BackgroundSelector.jsx file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The background selector show an error in console

4 participants