• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

How to generate contact page from php file on v4?

Version
4.0.0
PHP version
8.1
Database driver
MariaDB
Database version
10.6.7
Web browser
Chrome

lovedigit

👽 Chevereto Freak
Hello,

On v3, to generate contact form we had a contact.php file which would generate .html file. We could edit it from dashboard, or from php file, and it would update the html file. But I am puzzled about v4.
After updating to v4.0.0 from v3.20.19, the contact page as well as TOS page html file is empty. I tried deleting html file from /content/pages/ so that it would be generated once again from the relevant php files. But it is not working.
If I try to copy paste the contents from the php file, for example from /content/pages/default/contact.php to dashboard page editor, the contact page throws error.
13_chrome_2uvpaBca5a.png

And if I copy /content/pages/default/contact.html to /content/pages/contact.html, the contact page doesn't work. For starters it doesn't look like the demo.
15_chrome_P5KetUy1Uf.png
and it doesn't send email.

Any help will be greatly appreciated.
 
Last edited:
So, all I have to do is write php code directly on dashboard pages editor, right?

But, I am still getting the same error if I copy and save contents of /content/pages/default/contact.php to dashboard pages editor.

What I really want to know if how do I add php code to these pages? Because directly adding them from pages editor doesn't work anymore.
Also, "Enter/New Line" keyboard button doesn't work in the editor as well.
 
Last edited:

CHEVERETO_ENABLE_PHP_PAGES
I set
Code:
'CHEVERETO_ENABLE_PHP_PAGES' => '1',
in env-default.php
As a result I get 'This file cannot be directly accessed.' if I try to access any of the php pages.
I have also saved all the contents of the pages in html files so I reverted to the original env-default.php
They all function except the contact page which gives me the same result as the op.

What am I doing wrong?
 
Make sure you also edit file name extension to .php in dashboard > settings > pages > “PAGE NAME”

Where PAGE NAME is name of the page you want to edit.
 
I set
Code:
'CHEVERETO_ENABLE_PHP_PAGES' => '1',
in env-default.php
As a result I get 'This file cannot be directly accessed.' if I try to access any of the php pages.
I have also saved all the contents of the pages in html files so I reverted to the original env-default.php
They all function except the contact page which gives me the same result as the op.

What am I doing wrong?
At least I seem to have resolved the problem as far as the 'Contact page' is concerned in HTML.
To cut a long story short I changed the 'Internal page type' to 'Extra page' and then after looking at creating a new contact page I changed my mind and changed the 'Internal page type' back to 'Contact page'. Much to my surprise it then worked.
I think it must have made some correction to the database when I did this.
As this is now working I will leave the page type as HTML instead of worrying about PHP on the basis of 'why fiddle with something that is working' 😆
 
Back
Top