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

BUGFIX: 9.0 infinite (real) reloads after exception #3748

Merged

Conversation

73nici
Copy link
Collaborator

@73nici 73nici commented Mar 13, 2024

What I did
Update the NodeInfoHelper to build an initial absolute URL, instead of a relative one.

How to verify it

Throw an exception (or return an abnormal response) in any places and expect the iframe to be only loaded once.
The orange loading bar will keep spinning but that is part of #3477.

throw new \Exception(rand());

But currently this results in an endless reload, because in the condition of the frame win.location.href will not equal this.props.src causing win.location.replace(this.props.src) being retriggered infinitely:

if (win && win.location.href !== this.props.src) {

@github-actions github-actions bot added the 9.0 label Mar 13, 2024
@73nici 73nici marked this pull request as ready for review March 14, 2024 11:42
@73nici 73nici force-pushed the bugfix/3477-infinite-loading-indicator-and-redirect branch from 633c038 to c4ffef9 Compare March 14, 2024 13:49
@mhsdesign mhsdesign self-assigned this Apr 3, 2024
@mhsdesign mhsdesign changed the title Bugfix/3477 infinite loading indicator and redirect BUGFIX: 9.0 infinite (real) reloads after exception Apr 3, 2024
@github-actions github-actions bot added the Bug Label to mark the change as bugfix label Apr 3, 2024
@mhsdesign mhsdesign force-pushed the bugfix/3477-infinite-loading-indicator-and-redirect branch from c4ffef9 to 93a8a85 Compare April 3, 2024 20:15
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to look at this again, it seems after navigating via the site tree the infinite reloads continue.

Basically there are two ways to trigger this bug, one via navigating via the iframe to a broken page or via the document tree.
Both should stop loading after encountering the first error. (The orange indicator might continue spinning but there should not be any real reloads)

In 8.3 always absolute src are used for ui.contentCanvas.src: "http://127.0.0.1:8081/neos/preview?node%5B__contextNodePath%5D=%2Fsites%2Fneosdemo%2Ffeatures%2Fnavigation-elements%2Ffirst-item%40user-admin%3Blanguage%3Den_US"

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@73nici
Copy link
Collaborator Author

73nici commented Apr 11, 2024

Hey @mhsdesign,
can i still help with something to get this PR merged :)?

@mhsdesign mhsdesign force-pushed the bugfix/3477-infinite-loading-indicator-and-redirect branch from a56aa04 to 4cb1428 Compare April 27, 2024 08:41
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks now it works. Neither the inline navigation (via the iframe) nor the navigation via the document tree leads to endless exception flodding like currently:

Bildschirmaufnahme.2024-04-27.um.10.50.38.mov

That way we restored the same behaviour as in Neos 8.3

@mhsdesign mhsdesign merged commit b8d1a20 into neos:9.0 Apr 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants