stephenou / fruitionsite

Build your website with Notion for free
https://fruitionsite.com
MIT License
1.6k stars 222 forks source link

Back action to notion #264

Open wihamedia opened 1 year ago

wihamedia commented 1 year ago

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 commented 11 months ago

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 commented 9 months ago

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

trthomas108 commented 9 months ago

https://github.com/stephenou/fruitionsite/issues/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 commented 9 months ago

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 commented 9 months ago

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

trthomas108 commented 9 months ago

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

jraadd commented 4 months ago

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 commented 3 months ago

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

stevenya97 commented 3 months ago

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

knownissuewontfix commented 3 months ago

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

is there a site that you can repro this?