Followed installation instructions but cannot access CMS?

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

I used the latest version today with composer and called my installation “globalvision”. I installed it in an existing WAMP installation.

I then went through the first lesson. It had me create a project and place a templates directory under app. In that I placed the “hello world” Page.ss file it suggests. So far so good. I also put the three empty folders (css, javascript and images) it recommended under public and deleted themes/ as it recommends.

By the way there is an error in that it wants you to rename code to src/ and also rename mysite to app - the installer has app and src already.

I added a .env (note there appears to be another error here in the lesson - it shows a config screen coming up and THEN tells you to create .env. Instead I just saw an error message wantintg a .env and no config screen.

Anyway it created the database and showed my hello world template. all good.

BUT I cannot get to the CMS. If I go to localhost/globalvision/admin it redirects to http://localhost/globalvision/Security/login?BackURL=%2Fglobalvision%2Fadmin%2Fpages%2F and just loads my hello world.

I note that the installer did add a .htdocs wich redirects public/* to $(1) but I don’t know why I cannot load admin/ at all.

Any ideas?

Hi,

There have been a few changes to the code / release process lately which haven’t yet been reflected in the lessons, so that’s why there are a couple of discrepancies.

In terms of your issue, you need to be logged in to be able to see the CMS, which is what the redirect is trying to do.

So, a couple of possible scenarios:

If you’re not seeing a login form on your page, then you’ll need to add $Form to your page template and try again.

If you have the form but don’t have any login details, then the quickest way to proceed is to add some defaults in the .env file:

SS_DEFAULT_ADMIN_USERNAME = 'admin'
SS_DEFAULT_ADMIN_PASSWORD = 'password'

That should allow you to log in, and you can start using the CMS.

okay - I think that is likely the issue. I do not see a login option.
I added the keyword ‘$Form’ in the template but nothing appeared either on the page or in the source.
I am not aware of the $Form keyword - happy to read up on it if you can direct me where, but
I just inserted it literally into the body. Is that the right thing to do for testing?

I also added the

SS_DEFAULT_ADMIN_USERNAME = 'admin'
SS_DEFAULT_ADMIN_PASSWORD = 'password'

but I don’t get a login form to apply them.

the template is

<html>
<body>
$Form
</body>
</html>

Just so I’m clear, which template have you added the $Form to? I’m guessing you have /app/templates/Page.ss ? Is that where you’ve added it?

It might be worth trying a flush to ensure the latest version of the template is loaded by adding the flush parameter to the URL, eg. http://example.com/?flush

Yep! That was it! Thanks so much.

1 Like

thanks so much for that