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

Back action to notion #264

Open
wihamedia opened this issue Nov 21, 2023 · 10 comments
Open

Back action to notion #264

wihamedia opened this issue Nov 21, 2023 · 10 comments

Comments

@wihamedia
Copy link

I used my cellphone to open the imamhanafi.com website, but when I returned, instead of returning to the home page, it returned to the notion of login.

@yinan-star
Copy link

Me too!!! But I don't know how to fix this, when I asked gpt it said that it could be caused by fetchAndApply function. But even though it provides some modifications, it doesn't fix the problem very well.

@MaxfromNA
Copy link

I have the same problem in 2024. Is there any solution?

@trthomas108
Copy link

#258 - Okay so I tried this, and I'm able to navigate back and forth now. But something new is broken, the page doesn't remove my 'slug' (what comes after my domain)

@rafaelthz
Copy link

I had the same problem and went to investigate the worker.js code in Cloudflare.

I don't know the exact reason but here there was a problem with the "dark/light mode toggle" function at __console.environment.ThemeStore.setState() line.

If you don't care about the "dark/light mode toggle", just delete or comment the call of the function, at this line:

addDarkModeButton(nav ? 'web' : 'mobile');

Clear the cache and the redirection will work again!

But if you want to fix the "dark/light mode toggle", check this issue #258 and update your functions onLight, onDark, addDarkModeButton and add the enableConsoleEffectAndSetMode function as it is in the issue.

Don't forget to "Save and deploy" in Cloudflare workers after any edit.

I hope it helps :)

@MaxfromNA
Copy link

[rafaelthz]Thank you very much! Your advice on removing the dark dark line helped.

@trthomas108
Copy link

Any idea why issue #258 would cause the slug to not be removed?

@jraadd
Copy link

jraadd commented Jul 24, 2024

Hey @rafaelthz, thanks for the write-up. Unfortunately deleting the "addDarkModeButton(nav ? 'web' : 'mobile');" line didn't work for me. If I look around on others' linked Fruition websites who said it fixed it, it appears like the problem still exists. Does anyone have any updated solutions to solve this?

@knownissuewontfix
Copy link

one way to fix it is to change this line:
history.replaceState(history.state, 'bypass', '/' + page);
to
window.location.href = '/' + page; return;

@stevenya97
Copy link

Doesn't work for me. Also causing a full page refresh load

@knownissuewontfix
Copy link

Doesn't work for me. Also causing a full page refresh load

is there a site that you can repro this?

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

8 participants