Grav failing on me

Hi,

Since yesterday I am fighting with Grav. I have a couple of issues.
At first mu issue was that my commandline only haa php 7.1.33 availble when run via #/usr/bin/env php I tried to get around this by running php74 bin/gpm blahblah . This seems to work, so the next issue was I did not get the admin page. Turned out I had to rename htaccess.txt to .htaccess. Hey, I got to the create an admin user page.
So far so good, nice plugin.

So after hopping around in that plugin and altering a bit on 1 of the template pages, I decided to have a look on the frontpage. And it gives me just code?

Pls check www.chellatakescare.nl . I have just plain php code like it is playing as text instead of via php.

BTW, I download the gravgrayscale skeleton and upgraded that to be able to use the admin plugin.

What could I do for this?

Regards

@tuckson, Grayscale is not compatible with Grav 1.7.0.

Twig has tightened the security of templates to prevent malicious code to run in the browser. For this, Twig has enabled auto-escaping for all output commands ({{ }}).

To fix this, the Grav template has to tell Twig that some outputs can to be trusted. That is done using the | raw filter. Notorious outputs for which the raw filter is needed are:

  • {{ page.content | raw }}
  • {{ assets.js() | raw }}
  • {{ assets.css() | raw }}

You could ask de developer of Grayscale to do that for you, but I have little hope it will be done…

You might want to try another theme which is more modern. Any theme created by ‘Team Grav’ is kept up-to-date.

As a beginner, I would suggest to stick to Quark for a while until you get a better understanding of Grav.

Thnx for the reply. I was already afraid for this kind of stuff a little when I find out the selfupdate would update from 1.0.0.something to 1.7.14 :smiley:

Would it be sufficient to just do a find of all files under the docroot en just use sed to replace {{ page.content }} with {{ page.content | raw }} and the same for the other 2 as well?

BTW, I am not really new to webdev, but php is not my thingy :wink: But I do know my share in IT / coding

However, I came to grav and this template because it seemed to fit very well the need I have at this moment.

@tuckson,

Would it be sufficient to just do a […]

Try it and you’ll know it… Although the chances the theme will ever be updated is minimal, but when it does, all changes you have made will be overridden.

If you really like the theme… you might clone the theme on Github, make the changes, create a PR at the original to share the changes, and use your own clone.

Tried. It did change a few things, but appearantly it wasn’t enough.

had a quick look , you can get somewhere but you need to go through all the twig files in the template and the partials and the modular to get it 50% working , the map function is outdated and the guy has abandened the project

Rebuild skeleton · Issue #2 · vmcosta/grav-skeleton-grayscale-site (github.com)

Somebody has been kind enough to update a skelton here, not sure if that helps
Grayscale upgrade to Grav v1.6.9 · Issue #8 · vmcosta/grav-theme-grayscale (github.com)

OK,

I installed big-picture theme via gpm, no errors, and I activated it in the admin gui.

yet I get a lot of errors.

Will delete and start all over with a fresh install.

Thnx,
I will have a look at that one. Had a look at the demo of that big-picture template because it looked promising, but it is not fully repsonsive unfortunaly. The demo (deleted) when viewed on a cell phone in landscape. So that is also not the way to go.

@tuckson, Please mind your language…

Yep it is pretty similar in look and feel.
If you use the github greyscale 1.6.9 on top of grav install , it throws a wobbler !

You can cure it by then updating grav
easy by the command line (based on windows) be in the grav directory and run php grav/gpm self-upgrade and you will get a rough idea of the template.

Nothing special and as grav has matured, there are better ways of doing things, also the greyscale.js needs a new google maps api…

The newer themes will tend to reflect newer technologies and “web good practises” , if all is good, can you then mark the topic as solved and if need more help, start a new post :slight_smile:

??? What did I do?

Actually, did did work out quite well as far as I can see now :slight_smile:
I took dat reworked version and did the sed magic @anon76427325 pointed out. And so far it seems to work now.

It was a combination of 2 posts, can I appoint partial solutions?

Thnx anyway, for all help.

Actually I have done quite a lot with wordpress, joomla and big java sites, and grav is kind of refreshing.

I need a quick fix for now, but it looks interesting enough to dive a bit deeper in.

1 tip, it would be nice if the download pages for themes and skeletons show version compatibilty.

Cheers.