Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWPP-4321: Ensure oe_theme favicons are used if the subtheme is configured to use them and doesn't provide them. #1492

Open
wants to merge 3 commits into
base: 4.x
Choose a base branch
from

Conversation

22Alexandra
Copy link
Contributor

No description provided.

nagyad
nagyad previously approved these changes Sep 2, 2024
oe_theme.theme Outdated
foreach ($attachments['#attached']['html_head_link'] as &$link) {
if ($link[0]['rel'] !== 'icon') {
continue;
}
$link[0]['href'] = base_path() . $active_theme->getPath() . "/images/favicons/$component_library/favicon.ico";
$link[0]['href'] = file_exists($favicon) ? $favicon : base_path() . $oe_theme_path . "/images/favicons/$component_library/favicon.ico";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file_exists($favicon) will always be FALSE because base_path() returns the path as seen by the web server.

I noticed it when I added a custom favicon.ico to the ewcms_theme
In this case, file_exists checks for /build/profiles/custom/ewcms/themes/ewcms_theme/images/favicons/ec/favicon.ico, and this path does not exist in the filesystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants