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

:8080/my-account is only loading loop #172

Open
Jackiiiii opened this issue Jun 15, 2024 · 6 comments
Open

:8080/my-account is only loading loop #172

Jackiiiii opened this issue Jun 15, 2024 · 6 comments

Comments

@Jackiiiii
Copy link

Hello, i wanted to ask if u maybe know why my account page has an loading loop. i have install 3 wordpress, reinstall it on 2 server and still the same everything else works.

kind regards
Jack

@Jackiiiii
Copy link
Author

Aufzeichnung.2024-06-15.234233.mp4

@scottyzen
Copy link
Owner

Hi @Jackiiiii,

Are there any errors in the console?

@Jackiiiii
Copy link
Author

If i start the server, in the console i see no error, or do you mean somewhere else?

@scottyzen
Copy link
Owner

scottyzen commented Jun 18, 2024

Right-click on the page and select inspect and then go to the console tab.
If you want to GraphQL endpoint I'll take a look.

@alexookah
Copy link
Contributor

alexookah commented Jul 27, 2024

@scottyzen
I managed to reproduce the problem! My account waits forever the cart to load

defineNuxtPlugin in plugin.init.ts
has this code:

    // Wait for the user to interact with the page before refreshing the cart, this is helpful to prevent excessive requests to the server
    let initialised = false;
    const eventsToFireOn = ['mousedown', 'keydown', 'touchstart', 'scroll', 'wheel', 'click', 'resize', 'mousemove', 'mouseover'];

Video:

352779171-7aef2f56-ba7f-4772-9234-23f71887aa16.2.mov

Unless there is some user interaction the cart wont try to load.
The same problem occurs also in checkout page. If you try to refresh without any event triggering

I dont think it makes much sense with this events toFireOn.
Maybe it should be configurable. But I would not enable this in my personal project.
I think this code should be removed. Because in mobile if someone tries to open a page they might be waiting forever until they try to scroll up and down for the request to trigger.

WDYT?
Should I make a PR removing this?

@alexookah
Copy link
Contributor

@scottyzen @Jackiiiii
this issue should be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants