Free Tier Incorrectly Listed on Post Tier Visibility

We have a post that has its visibility set to two specific paid tiers (“News +” and “News Pro” tiers. In the theme we have this template code to list the tiers required for access:

{{#has visibility="tiers"}}
    {{t "This post is for subscribers on the "}}

However, what displays is “This post is for subscribers on the Free, News + and News Pro tiers”. Why is our “Free” tier included in the list even though it isn’t selected as one of the tiers with access to the post?

Where is that hbs code located? That code should work correctly as part of content-cta.hbs (example code here: Ghost/ghost/core/core/frontend/helpers/tpl/content-cta.hbs at 3d989eba2371235d41468f7699a08e46fc2b1e87 · TryGhost/Ghost · GitHub )

It’d be helpful to know what version of Ghost you’re running, also.

I just tested on my Ghost Pro demo site (which could use some clean-up of tiers, clearly), using Casper, and here’s what I got:

That looks like the target behavior, so please explain more about what you’re doing?

1 Like

We are on the latest version of Ghost Pro, v5.79.6, using a custom theme based on the Tripoli premium theme. Our upgrade.hbs template looks very similar to the core helper template you referenced. In our theme’s page.hbs and post.hbs it’s included like this:

{{#unless access}}
   {{> upgrade }}

I’m wondering if maybe our “Free” tier isn’t set up correctly that’s making it show up all the time? We didn’t set anything up ourselves originally - we’re just taking over maintenance of the site this year.

Thanks for your help!

Ah, thanks for that extra info!

I have a copy of Tripoli (from a month or two back) handy, and tried it. I saw the same problem. It shows Free and Paid Tier for me also, so I don’t think it’s something you did @sitdev .

Whoa, hang on…

I can replicate the problem on Ghost 5.80. I do not see the problem on my Ghost Pro site that’s still on 5.79 today. Let me flip the 5.80 site over to Source for a second and see if that changes the situation…

OK, it’s a 5.80 problem. Hey @RyanF and @Kevin ? You may want a good hard look at the behavior of the tiers helper. These are posts set to a specific tier access only. Here’s 5.80 (running Source latest)

And here’s 5.79, also Source latest:

Both are on Ghost Pro - it’s just a difference between whether they’re in the early or late roll-out group, looks like!

Bug filed over here: {{tiers}} helper has regression in 5.80 - "free" tier shown in list. · Issue #19796 · TryGhost/Ghost · GitHub

Thanks, @sitdev and @Cathy_Sarisky, for flagging. I escalated with our engineers for additional investigation.

1 Like

This problem got patched today, so we’ll hopefully see it fixed in Friday/Monday’s release. :)

1 Like

Awesome. Thanks so much for your help!

As @Cathy_Sarisky mentioned, we’ve identified the bug and rolled out a fix in v5.80.1. Thanks all who reported and researched!