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

**URL:** https://meta.discourse.org/t/show-full-post-button-doesnt-work-in-subfolder-installations/390811
**Category:** Support
**Tags:** embedding, subfolder
**Created:** [December 9, 2025, 6:21pm UTC](https://meta.discourse.org/t/show-full-post-button-doesnt-work-in-subfolder-installations/390811 "2025-12-09T18:21:00Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 10, 2025, 11:16pm UTC](https://meta.discourse.org/t/show-full-post-button-doesnt-work-in-subfolder-installations/390811/4 "2025-12-10T23:16:33Z")

</div>

I had to debug this issues like this a couple of times and it’s complicated, so bear with me.

Run the following script and share the output here

```ruby
# Replace with the topic ID or URL you're debugging
topic_id = 386983

# 1. Check if TopicEmbed exists and its content
te = TopicEmbed.find_by(topic_id: topic_id)
puts "TopicEmbed exists: #{te.present?}"
puts "Embed URL: #{te&.embed_url}"
puts "Content cache present: #{te&.embed_content_cache.present?}"
puts "Content cache length: #{te&.embed_content_cache&.length || 0}"
puts "Content SHA1: #{te&.content_sha1}"

# 2. Check the actual cached content (first 500 chars)
puts "\n--- Cached content preview ---"
puts te&.embed_content_cache&.truncate(500)

# 3. Try fetching from the remote URL
if te&.embed_url.present?
  puts "\n--- Attempting remote fetch ---"
  begin
    response = TopicEmbed.find_remote(te.embed_url)
    puts "Remote fetch success: #{response.present?}"
    puts "Remote body present: #{response&.body.present?}"
    puts "Remote body length: #{response&.body&.length || 0}"
    puts "Remote title: #{response&.title}"
    puts "Remote body: #{response&.body&.truncate(500)}"
  rescue => e
    puts "Remote fetch FAILED: #{e.message}"
  end
end

# 4. Check what expanded_for would return
if te.present?
  puts "\n--- Testing expanded_for ---"
  post = Post.find(te.post_id)

  # Clear cache to force fresh fetch
  Discourse.cache.delete("embed-topic:#{topic_id}")

  begin
    expanded = TopicEmbed.expanded_for(post)
    puts "Expanded content present: #{expanded.present?}"
    puts "Expanded content length: #{expanded&.length || 0}"
  rescue => e
    puts "expanded_for FAILED: #{e.message}"
  end
end

# 5. Check relevant settings
puts "\n--- Site Settings ---"
puts "embed_truncate: #{SiteSetting.embed_truncate}"
puts "allowed_embed_selectors: #{SiteSetting.allowed_embed_selectors}"
puts "blocked_embed_selectors: #{SiteSetting.blocked_embed_selectors}"

```

This will show why [https://tecnoblog.net/comunidade/t/governo-renova-app-da-cnh-para-baratear-obtencao-do-documento/157462?u=falco](https://tecnoblog.net/comunidade/t/governo-renova-app-da-cnh-para-baratear-obtencao-do-documento/157462?u=falco) is failing

---

_[View the full topic](https://meta.discourse.org/t/show-full-post-button-doesnt-work-in-subfolder-installations/390811)._
