I’m having trouble figuring out why my /account/ page doesn’t get display properly to paid members. Namely, I use a very similar structure to what is used in Lyra.
{{#if@member.paid}}
…
custom message for paid members
…
{{else if @member}}
…
custom message for non-paid members
…
{{else}}
…
{{/if}}
The problem is that while non-paid members see the correct version of the page, the paid members get a 404 error.
When it comes to the routes file, it also follows a simple flow of:
/subscribe/: members/signup
/signin/: members/signin
/account/: members/account
I’ve tried changing the routes file, applying different flow to if/else if helper but nothing seems to work.
Would appreciate any solutions or ways to try them out. Thanks!
The conditions seem to be fine and should work, but the error could come from what you have inside the paid member block. Maybe you can share that part of the code?
The part after {{else if @member}} gets displayed correctly to non-paid members.
Yet, the “main part” → {{#if@member.paid}} yields a 404 when a paid, active member goes to /account/. This code sits in the members/account.hbs file.
You can also find a full list of all the breaking changes here:
But making gscan part of your development workflow is the quickest and easiest way to keep on top of theme changes, it can be used to as a CLI-based testing tool to validate your theme as well as the online version.
Yea, I’m asking cause I put my theme through a Gscan, picked up a few errors and issues and fixed them so I had 100/100 score. This “mistake” was there and gscan didn’t highlight it as an error/issue/etc.