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

BUG: Occasions of the loading indicator running in an endless loop #3477

Open
grebaldi opened this issue May 2, 2023 · 2 comments · May be fixed by #3714
Open

BUG: Occasions of the loading indicator running in an endless loop #3477

grebaldi opened this issue May 2, 2023 · 2 comments · May be fixed by #3714
Labels
7.3 8.3 Bug Label to mark the change as bugfix UI & UX

Comments

@grebaldi
Copy link
Contributor

grebaldi commented May 2, 2023

Description

There are a couple of occasions in which the loading indicator doesn't notice that some async process has failed and just ends up looping endlessly.

Several older issues mention this phenomenon:

Steps to Reproduce

Repro 1

  1. Open a page in the backend
  2. Run ./flow session:destroyall
  3. Navigate to a different page in the backend, so the login dialog shows up
  4. See that the loading indicator runs in an endless loop

Repro 2

  1. Render a page with just one Neos.Fusion:Debug output like this:
prototype(Vendor.Site:Document.Page) < prototype(Neos.Fusion:Component) {
    renderer = Neos.Fusion:Debug {
        foo = 'bar'
    }
}
  1. Open that page in the backend
  2. See that the loading indicator runs in an endless loop

Repro 3

  1. Provoke an error by rendering a page like this:
prototype(Vendor.Site:Document.Page) < prototype(Neos.Fusion:Component) {
    ren/derer = 'foo'
}
  1. Open that page in the backend
  2. See an error message an the loading indicator running in an endless loop

Expected behavior

The loading indicator should not run in an endless loop, but stop when an error occurs.

Actual behavior

Peek 2023-05-02 15-44

Affected Versions

Neos: >= 7.3 (and older)

UI: >= 7.3 (and older)

@laurahaenel
Copy link
Collaborator

laurahaenel commented Mar 13, 2024

Problem

We don't want to force users to reload the complete page (F5) when an error occurs.
We want devs to be able to use the UI to print debug staff (or to investigate errors without reloading).

Possible solution

  • event Neos.Neos.Ui.ContentReady stays because we want to introduce a new modal if the iframe indicates a reload
  • instead of endless reloading, we show a new error modal with two buttons to reload (once) or to cancel (no reload)

@mhsdesign We need to specify what the modal should say and which functionalities to offer.

  • When updateIframeUrlIfNecessary is fired, we show modal
  • Modal contains error description (a general one?)
  • Function 1 -> Cancel: No reload, user needs to F5
  • Function 2 -> Reload: Reload iframe, if error persists the modal will be shown again

Opened new feature request #3746

@grebaldi any thoughts on that?

@mhsdesign
Copy link
Member

Things we discussed / found out at the sprint

  • when laura and me wrote the above list, we assumed that Neos 8.3 and 9.0 behave the same, but only 9.0 actually reloads the iframe on error, while 8.3 just shows an annoying indicate but doest for example rethrow the error and thus spams the exception log.
  • we found out that the line document.removeEventListener('Neos.Neos.Ui.ContentReady' is a noop in the iframe and doesnt cleanup the handler
  • while the hotfix of BUGFIX: Prevent infinite refresh loop #2566 is not perfect it solves two problems that should not resurface
    • the loading indicator doesnt spin needless and annoys the developer
    • the inspector at the right shows all properties of the current page, even if the rendering failed (instead of showing a loading state as well)
  • Christophers zebra relies on a delayed iframe initialisation (as the nodes and ce wrapping will be rendered via react or vue)
  • we want to move the neos ui page exception handler (which was duplicated for ember) back to Neos.Neos (without the guestNotificationScript hack, as this is Ui specific)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.3 8.3 Bug Label to mark the change as bugfix UI & UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants