"Show Full Post" button doesn't work in subfolder installations

I recently moved our Discourse installation to a subfolder. After doing that, the “Show full post” button stopped working – you click to expand the content, but it doesn’t load the full post.

Nothing changed in my WP Discourse configs.

https://tecnoblog.net/comunidade/t/paramount-oferece-us-108-bilhoes-em-dinheiro-para-tomar-warner-da-netflix/157441

When accessing the embed url directly in the browser, it returns a 404 error:

https://tecnoblog.net/comunidade/posts/483289/expand-embed

1 Like

This is unrelated, this route only responds with an application/json content-type. https://tecnoblog.net/comunidade/posts/483289/expand-embed.json is returning

"<div><div></div></div>\n<hr>\n<small>Este é um tópico de discussão auxiliar para a entrada original em <a href='https://tecnoblog.net/noticias/paramount-oferece-us-108-bilhoes-em-dinheiro-para-tomar-warner-da-netflix'>https://tecnoblog.net/noticias/paramount-oferece-us-108-bilhoes-em-dinheiro-para-tomar-warner-da-netflix</a></small>\n"

The <div><div></div></div> should be the content.

Did you also change the blog URL by any chance?

The onebox display also feels odd to me, I’d expect it to have a cached truncated content instead, so I’m assuming body.present? is false in the above conditional.

Can you enter the Rails console and check if TopicEmbed.where(topic_id: 157441).pick(:embed_url) shows you the correct blog content URL?

Can you spot any related errors on https://tecnoblog.net/comunidade/logs?

2 Likes

Oh, ok!

It returns the post url:

discourse(prod)> TopicEmbed.where(topic_id: 157441).pick(:embed_url)
=> “``https://tecnoblog.net/noticias/paramount-oferece-us-108-bilhoes-em-dinheiro-para-tomar-warner-da-netflix”

I don’t think there’s any related errors in the log.

Nop! The blog URL has always been `tecnoblog.net`

Also worth mentioning that he server’s IP is bypassed in CF’s Firewall:

1 Like