Email signup text visible when user is logged in
-When logged OUT, email signup text is visible (this seems correct)
-When logged IN, email signup text is still visible (this seems correct)
-Expected that when logged OUT, email signup text visible and when logged IN, site description visible instead of email signup text
Steps to Reproduce
Make sure email signup text and site description are populated
Test site while logged in and while logged out to reproduce bug
Setup information
Ghost Version Latest version of Ghost Pro
Browser & OS version Reproducible in Chrome/Chromium/Firefox on Linux/Windows, iOS, etc.
Additional Notes
It appears from reading the code in cover.hbs that the logic for determining whether to display Site Description, Email Signup Text, or both (or neither) is incorrect.
I almost want to just fork the Github repo for Edition, fix it, and then submit a merge request. However, maybe there is a better way for them to fix it globally. Guess we’ll see who is faster.
For now I worked around this bug by not using a description nor email signup text; but it’s interesting to learn that you have observed it in other themes as well.
As for contributing, there is some guidance in the README of our official themes.
This repo is synced automatically with TryGhost/Themes monorepo. If you’re looking to contribute or raise an issue, head over to the main repository TryGhost/Themes where our official themes are developed.
Hi, I’m experiencing the bug on Ghost Pro w/ Casper v5.3.1 and Journal v1.0.0 and probably others too. Here you can see I’m logged in as an unpaid member, but still shown the Sign up link:
In my testing today after upgrading to latest, it does exactly what is described in the code:
If Site Description and Email Signup Text are populated, it shows Email signup text while logged in or not
If Email signup text only is populated, it shows nothing while logged in or not
If Site Description only is populated, it shows description while logged in or not
Back to the code: it seems to say exactly that. It does test for membership, and hides the email address field if logged in (correctly); but I think it should also be hiding the Email signup text based on that test.
I’m unsure what the behaviour “should” be for displaying Site Description; it could logically be shown instead of the Email signup text, but it could also potentially be displayed above or below the Email signup text.
This is a very quick fix which seems to work, although not necessarily formatted as one would like. It checks whether site.description is populated and displays it if so. It also checks whether custom.email_signup_text is populated and displays it so, unless the user is not a member.
I think the basic logic is sound, but that someone more skilled than I at Handlebars, CSS, and Ghost should probably do the needful.
Interesting. But for me, I was planning up upgrading to the more expensive Ghost(Pro) after I successfully test it … not as a way for me to hack it into working condition.
This has me considering self-hosting — although this is an area I wanted to buy, not build.
On the upside, I’m impressed with how quickly the Ghost repo maintainers merge in PR’s.
But on the downside, I’m a little disappointed with the lack of UI / integration tests for this kind of thing. (I couldn’t find one, but maybe it’s set up somewhere.)
I also like to refactor branching out of templates in my code, and use polymorphic templates. So for example, I’d have a completely separate template that runs when the user is signed in. And sub-templates like maybe_show_signup_form. So the result would be short templates that read from top to bottom without if’s.
I think that the coding style in use here and lack of tests will result in these bugs re-occurring from time to time.