Enable altered favicon overrides.

Created on 17 December 2019, over 5 years ago
Updated 16 May 2025, 29 days ago

Hello,

I'm using this module alongside the responvie favicons module and i've noticed the favicon alterations cause render issues, that is the original favicon loses its transparency etc.

A quick google shows that you should point the TinyCon library to a specific png to avoid render issues.

I have created a patch so that when favicon alteration is enabled the user has the option to override the default favicon (ie/ provide a path to the fault tolerant png)

Before: https://www.drupal.org/files/issues/2019-12-17/before.png β†’
After: https://www.drupal.org/files/issues/2019-12-17/after.png β†’

Hope this helps a few people out.

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom JParkinson1991

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Merge request !94Draft: Apply patch. β†’ (Open) created by trackleft2
  • πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

    I've converted the patch to a merge request and updated it to integrate any upstream changes that have been merged.

    Unfortunately this does not seem to work for me using Lando for local development.

    If I enter: /core/themes/olivero/favicon.ico

    The Json settings output looks like this

    "environmentIndicator":{"name":"Lando","fgColor":"#EFEFEF","bgColor":"#990055","addFavicon":true,"faviconPath":"\/app\/web\/core\/themes\/olivero\/favicon.ico","toolbars":{"toolbar":"toolbar"}}
    

    Seems to be setting the absolute path on the server.

    Here is my config
    ```
    name: environment_indicator
    recipe: drupal10
    config:
    php: '8.3'
    via: apache:2.4
    webroot: web
    database: mariadb:10.6
    xdebug: false
    services:
    database:
    type: compose
    services:
    image: mariadb:10.6
    command: docker-entrypoint.sh mariadbd
    restart: always
    ports:
    - '3306'
    environment:
    MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
    MARIADB_DATABASE: drupal10
    MYSQL_DATABASE: drupal10
    MARIADB_USER: drupal10
    MARIADB_PASSWORD: drupal10
    appserver:
    overrides:
    environment:
    SIMPLETEST_DB: 'mysql://drupal10:drupal10@database/drupal10'
    SIMPLETEST_BASE_URL: 'http://appserver'
    volumes:
    # Don't share our host working directory as /app. We want /app empty for composer.
    - /app
    # Instead share our host working directory as a standalone package.
    - .:/usr/local/environment_indicator
    build:
    # Create a new Drupal project and use the module as a non-packagist repository.
    - composer create-project --dev drupal/recommended-project:11.1.x /app
    - composer config extra.enable-patching true
    - composer config extra.composer-exit-on-patch-failure true
    - composer config allow-plugins.cweagans/composer-patches true
    - composer require cweagans/composer-patches
    - composer config minimum-stability dev
    - composer config allow-plugins.phpstan/extension-installer true
    - composer require --dev drupal/core-dev:^11.1 drush/drush phpspec/prophecy-phpunit:* phpstan/extension-installer mglaman/phpstan-drupal phpstan/phpstan-deprecation-rules drupal/config_inspector drupal/devel drupal/gin
    - composer config repositories.localdev path /usr/local/environment_indicator && composer require drupal/environment_indicator:\*@dev
    node:
    type: node:20
    build:
    - yarn install
    chromedriver:
    type: compose
    services:
    image: seleniarm/standalone-chromium:4.1.4-20220429
    command: /opt/bin/entry_point.sh
    tooling:
    # Provide a command to install Drupal.
    install:
    service: appserver
    cmd:
    - /app/vendor/bin/drush --root=/app/web site:install --account-mail=noreply@example.com --account-name=admin --account-pass=admin --db-url=mysql://drupal10:drupal10@database:3306/drupal10 -y --verbose
    - /app/vendor/bin/drush --root=/app/web en -y environment_indicator environment_indicator_ui devel config_inspector
    - /app/vendor/bin/drush --root=/app/web theme:enable -y gin
    - /app/vendor/bin/drush --root=/app/web config:set -y system.theme admin gin
    - /app/vendor/bin/drush --root=/app/web en -y gin_toolbar
    - /app/vendor/bin/drush --root=/app/web config:set -y environment_indicator.indicator name 'Lando'
    - /app/vendor/bin/drush --root=/app/web config:set -y environment_indicator.indicator bg_color '#990055'
    - /app/vendor/bin/drush --root=/app/web config:set -y environment_indicator.indicator fg_color '#EFEFEF'
    - /app/vendor/bin/drush --root=/app/web uli -l https://environmentindicator.lndo.site/
    # Provide Drush tooling to automatically know the Drupal root.
    drush:
    service: appserver
    cmd: /app/vendor/bin/drush --root=/app/web
    phpcs:
    service: appserver
    cmd: /app/vendor/bin/phpcs -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator
    # Provide PHPCBF tooling to fix coding standards.
    phpcbf:
    service: appserver
    cmd: /app/vendor/bin/phpcbf -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator
    # Provide phpstan tooling to check for code quality and deprecated code.
    phpstan:
    service: appserver
    cmd: /app/vendor/bin/phpstan analyse --configuration web/modules/contrib/environment_indicator/phpstan.neon web/modules/contrib/environment_indicator
    # Provide phpunit tooling to run unit tests.
    phpunit:
    service: appserver
    cmd: /app/vendor/bin/phpunit --configuration /app/web/core/phpunit.xml.dist --bootstrap /app/web/core/tests/bootstrap.php /app/web/modules/contrib/environment_indicator
    yarn:
    service: node
    cmd: yarn
    eslint:
    service: node
    cmd: yarn run eslint --color

    ```

  • πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ
Production build 0.71.5 2024