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

404 page has "dev.glitch.social" hardcoded in the header #1493

Closed
ftpmorph opened this issue Jan 27, 2021 · 8 comments
Closed

404 page has "dev.glitch.social" hardcoded in the header #1493

ftpmorph opened this issue Jan 27, 2021 · 8 comments
Labels

Comments

@ftpmorph
Copy link

I clicked on an account that has been deleted on my instance and noticed that the 404 page has the "dev.glitch.social" domain hardcoded into the header.

Screenshot 2021-01-27 at 11 42 46 am

Unfortunately I don't know my way around Mastodon well enough to know where the bug is coming from in the code, sorry I can't be more helpful.


  • [✓] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • [×] This bugs also occur on vanilla Mastodon
@ftpmorph ftpmorph added the bug label Jan 27, 2021
@ClearlyClaire
Copy link

ClearlyClaire commented Jan 27, 2021

It's not hardcoded in glitch-soc, but the 404 page is generated when running assets:compile and pulls the title from the site_title setting, which means you'd need to re-generate the file after changing the site_title setting (“Server name” in the “Site settings” admin panel).

EDIT: Not closing the issue because that behavior is definitely weird and not intuitive. I'd have to think about how to fix that. Maybe re-generate the static error pages on site settings updates, but I don't really like that idea much.

@ftpmorph
Copy link
Author

That's very odd because I'd already set my own server name in the admin settings before migrating over to Glitch. I'm guessing then if things work as they should the problem should go away next time I do an upgrade?

@ClearlyClaire
Copy link

Oh, you're actually right, what it does is generate the file using the default settings, just like it does upstream. I'm not sure what the reason for that is, and I'm not completely sure what we should do here.

In the meantime, you can edit config/settings.yml and run bundle exec rails assets:generate_static_pages

@ftpmorph
Copy link
Author

ftpmorph commented Jan 27, 2021

Thank you, I'll try that now. Seems like weird behaviour, surely upstream must be pulling in the admin's site name from somewhere?

Edit: one issue though, last time I edited one of those files, I couldn't upgrade without reverting them because of git. I had to either add that file to stash or commit it, and obviously no one wants me to commit my site's settings so I had to revert the changes otherwise it'd block me from running git pull. Is there any way around this so when I upgrade in the future I don't need to revert local changes to run git pull? Couldn't find one when I searched around, only that the fix is reverting local changes using git stash or other methods.

@ClearlyClaire
Copy link

Upstream has the same issue, it's pulling the default site title, which is “Mastodon” in upstream's case.

config/settings.yml is a tracked file, so yeah, you will have to deal with merge commits, stash the changes, or commit and use git pull --rebase to rebase your commit on top of the pulled in changes

@ftpmorph
Copy link
Author

ftpmorph commented Jan 27, 2021

Ahhh that makes sense. Perhaps a simple fix might be to change Glitch's default title to something more generic like "Mastodon Glitch" rather than a domain name of another instance? I personally wouldn't mind that.

I have just changed my config/settings.yml and reloaded mastodon-web and you were right, that has fixed it and it now shows my own site's title.

Edit: confirmed I am running a local branch that pulls from glitch-soc/main.

Screenshot 2021-01-27 at 1 46 50 pm

So from what I can tell, I can just commit that and it'll commit to my local branch. So now can I commit that change and run git pull to update or do I need to run git pull --rebase?

Of course if the default title is changed to "Mastodon Glitch" or something similarly generic I'll just dump my local change anyway.

Sorry for the tangent. I just want to make sure my upgrades run smoothly. I've had to keep bouncing back and forth with system snapshots because I messed these things up in the past.

@ClearlyClaire
Copy link

You can commit and do git pull or git pull --rebase, you may have to resolve conflicts, the difference is only in what the git history would look like: with git pull, you'd have merge commits, with git pull --rebase, you'd rebase your local changes on top of the rest.

In any case, I've pushed a change to the default setting, it is now “Mastodon Glitch Edition”.

@ftpmorph
Copy link
Author

Thanks for taking the time to explain that to me honestly. Now I know what to do with git if I want to tweak my instance in the future.

Since the default is now “Mastodon Glitch Edition” I'm perfectly happy with that since it only shows on error pages so for now I'll save any potential hassle and dump my changes when I next git pull.

Looks like this can be closed now then all is fixed :)

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

No branches or pull requests

2 participants