serlo / frontend

Next.js app that serves serlo.org
https://serlo.org
Apache License 2.0
38 stars 10 forks source link

Manual reload necessary after updating profile #1013

Closed Entkenntnis closed 3 years ago

Entkenntnis commented 3 years ago

If you edit your publish profile (/user/settings) and save, the new frontend needs a manual refresh to show the latest change.

inyono commented 3 years ago

This is currently necessary because of https://github.com/serlo/serlo.org/issues/629. Basically: API rejects the cache update from legacy's listener because the value doesn't include roles yet.

inyono commented 3 years ago

Should be fixed now (staging & prod).

elbotho commented 3 years ago

Thank you for the fix. The redirect is still to fast so the frontend displays the old value at first. We have this issue in other places as well and "fix" it by e.g. adding a hash to the redirect so we can do a reload. Long term a mutation will actually fix this :)

Entkenntnis commented 3 years ago

Maybe this is related to ISR caching behaviour - anyway, adding a hash would be a solution for the meantime.

elbotho commented 3 years ago

Okay, added a hack in above commit that should work for now until we have a mutation.