• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.
  • 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

header.php override not working

lumiworx

Chevereto Member
▶🚶‍Reproduction steps
  1. Copy 'header.php' from Peafowl theme directory, into /app/themes/Peafowl/overrides/views/header.php
  2. Edit copied 'header.php' nav text from "About", to "More..." (or any other text)
  3. Save the edited file, refresh Chev home page, and cleared the browser's cache for good measure.
😢Unexpected result

There's no change in the text when viewing any site page.

📃Error log message

There are no errors shown or included in any server logs.

Misc. Notes...

I just completed an update from v3.13.5 to v3.14.0 to see if there was a fix. This same behavior occurred before the update was done. Following the same procedure to create an override for 'index.php' and modifying the text blurb on uploading, it all works exactly as expected.
 
I have not tested your variant but I assume that this is not a bug, but a user error.
Please use the following file: \app\themes\Peafowl\custom_hooks\header.sample.php
Copy this to: \app\themes\Peafowl\custom_hooks\header.php
open the new header.php in dir custom_hooks
The Content of file header.php in custom_hooks is between </head> and <body>

Use the file \app\themes\Peafowl\custom_hooks\head.php to add content within the head tag.

To add content within the body tag (at the beginning) use the file \app\themes\Peafowl\custom_hooks\body_open.php

See: https://chevereto.com/docs/theme#custom-hooks
 
Thanks for the reply, but I have no need of a custom hook. I'm simply wanting to customize a single word of text that's hard-coded into the core header file... which is what the override functions are for. I used the exact procedure as detailed in the documentation - and it failed to execute the override. In an earlier release prior to the last few rounds of updates it was working fine, and now it doesn't - making it a bug.
 
As an update... I've tried to get the same basic end result by using a language file override instead of a theme view override, and that does work as expected.
 
Hi,

This is just a confusion in how that system works. I've tweaked the documentation a little bit:

Theme overrides
Theme overrides works by detecting a file override which replaces a given theme file, so the system will use the override instead of the default file. Overrides are placed at app/themes/Peafowl/overrides. For example, let's say you want to replace app/themes/Peafowl/views/image.php you have to simply copy the file to app/themes/Peafowl/overrides/views/image.php and the system will now use the override instead of the default file.

From your instructions:
  1. Copy 'header.php' from Peafowl theme directory, into /app/themes/Peafowl/overrides/views/header.php

The path of header override is /app/themes/Peafowl/overrides/header.php

And I have tested it on the demo:
1583004355755.png

Cheers,
Rodolfo.
 
Back
Top