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

Collection.hostName is empty in the logs #161

Closed
mrvdb opened this issue Aug 8, 2019 · 9 comments · Fixed by #171
Closed

Collection.hostName is empty in the logs #161

mrvdb opened this issue Aug 8, 2019 · 9 comments · Fixed by #171

Comments

@mrvdb
Copy link
Collaborator

mrvdb commented Aug 8, 2019

No UI behaviour mishap as far as I can see.

Upgrading to revision 8557119451f49638e69dc128a0842bd09e7dc9c9 on develop this line starts showing up in the logs and instructs to file a bug.

@thebaer
Copy link
Member

thebaer commented Aug 8, 2019

Thanks -- which requests do you see this on?

@mrvdb
Copy link
Collaborator Author

mrvdb commented Aug 8, 2019

all of them (well, almost)

@thebaer
Copy link
Member

thebaer commented Aug 8, 2019

Sharing any particular ones would be a huge help :)

@mrvdb
Copy link
Collaborator Author

mrvdb commented Aug 8, 2019

Not sure what I can add, the root at https://qua.name gives the error (4 times) Clicking on any blog (logged in), same.

A specific post, say https://qua.name/mrb/federated-writing-start doesn't show the error.

Editting a post does show it (https://qua.name/info/example-page/edit)

@mrvdb
Copy link
Collaborator Author

mrvdb commented Aug 8, 2019

In general: it seems only authenticated requests cause the error.

@thebaer
Copy link
Member

thebaer commented Aug 9, 2019

Thanks, that helps narrow it down. Will take a look.

@thebaer thebaer assigned ghost Aug 9, 2019
@ghost
Copy link

ghost commented Aug 12, 2019

Found the issue here, there is no host name on any collection. not even in the DB schemas

So will need to update the schemas and write a migration, or change c.Hostname to a function that returns either the collection hostname if set or the configured app hostname otherwise.

@thebaer
Copy link
Member

thebaer commented Aug 12, 2019

Ah, that's not quite it... We don't want to store the hostName in the DB -- it's configured in config.ini. The problem is that we're manually setting it in various places, like this one: https://github.com/writeas/writefreely/blob/8557119451f49638e69dc128a0842bd09e7dc9c9/collections.go#L450-L454

so that we don't have to pass in the app configuration into every database func. And we've missed a spot -- viewCollections() is one of those spots.

@ghost
Copy link

ghost commented Aug 12, 2019

oh ok, so only manual. much easier 😁

@ghost ghost mentioned this issue Aug 12, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants