Resolving Company Logo Display Issues After a Dolibarr Update: A Comprehensive Guide
   05/09/2025 00:00:00     Dolibarr , Wiki Dolibarr    0 Comments
Resolving Company Logo Display Issues After a Dolibarr Update: A Comprehensive Guide

Dolibarr, the open-source ERP and CRM system, is widely used by small and medium-sized businesses for its modularity, flexibility, and ease of use. However, as with any software system, updates—while essential for security, new features, and performance improvements—can occasionally introduce unexpected glitches. One such recurring issue users encounter after upgrading Dolibarr is the incorrect or missing display of the company logo across the interface or on generated documents like invoices and proposals.

This article provides a thorough and practical guide to identifying, diagnosing, and resolving company logo display issues following a Dolibarr update. Whether you’ve recently moved from version 16 to 17, 18 to 19, or beyond, the steps covered here will help you regain full control over your corporate branding inside Dolibarr.

Understanding the Nature of the Problem

After an update, you might notice that:

  • The logo is no longer displayed in the top-left corner of the user interface.

  • The logo is missing from PDFs (e.g., invoices, orders, quotes).

  • The logo appears broken (image not found or path invalid).

  • Multiple logos are displayed incorrectly or overlap.

  • Different modules show different versions of the logo.

These issues can be due to changes in directory structure, configuration variables, permission mismatches, or template rendering logic.

Key Areas to Investigate

  1. Configuration Settings

  2. Theme and Template Rendering

  3. Filesystem and Upload Directory

  4. User Permissions and File Access

  5. PHP Version Compatibility

  6. Caching and Browser Display

Let’s go through each of these one by one.

1. Configuration Settings: Check Logo Path and Format

Navigate to:

Home > Setup > Company/Organization

Under the section "Logo and watermark":

  • Check if the path to the logo file is correctly set.

  • If you’ve uploaded a new logo, confirm that it appears in the list.

  • Verify the format: JPG, PNG, and GIF are supported. For best results, use PNG with transparent background.

Common problems:

  • After an update, the logo path may reset to a default placeholder.

  • Logo filename might contain special characters that Dolibarr doesn’t handle well.

2. Theme and Template Rendering Issues

The logo in the user interface is rendered via CSS and template logic within the theme.

Navigate to:

Home > Setup > Display

Check the selected theme. If your logo is not visible:

  • Try switching to a default theme (e.g., "eldy" or "amarok") temporarily.

  • Inspect the template files for header rendering in /htdocs/theme.

  • For custom themes, verify that {logo} tags are not broken due to code changes.

PDF templates also render logos differently:

  • Go to:

Home > Setup > Modules > PDF Templates
  • Open the module for documents (Invoices, Orders, etc.)

  • Check the path for the logo in the configuration fields

3. Filesystem and Upload Directory

Dolibarr stores uploaded logos under:

/htdocs/viewimage.php?modulepart=mycompany&file=logos/filename.ext

Verify that:

  • The documents/mycompany/logos/ directory exists.

  • Your logo file is actually inside that directory.

  • The logo is not corrupted (try opening it directly in a browser).

Also, confirm the upload path in conf.php:

$conf->mycompany->dir_output = '/var/www/html/documents/mycompany';

4. File and Directory Permissions

Improper file permissions can prevent Dolibarr from accessing your logo image.

Ensure:

chmod -R 755 /var/www/html/documents/mycompany
chown -R www-data:www-data /var/www/html/documents/mycompany

Use the correct user (www-data or apache) depending on your server setup.

5. PHP Version Compatibility

Certain functions (like imagecreatefrompng()) require PHP image libraries.

After an upgrade:

  • Ensure GD Library is enabled: php -m | grep gd

  • If missing, install it: sudo apt install php-gd

  • Restart Apache or PHP-FPM after installing

Check logs:

/var/log/apache2/error.log
/var/log/php-fpm.log

6. Clear Caches and Refresh Browser

Sometimes it’s not a Dolibarr problem but a caching issue:

  • Clear browser cache and reload the page.

  • If using a CDN or reverse proxy, purge the cache.

  • Dolibarr also stores some interface settings in session – log out and back in.

Step-by-Step Logo Reassignment Process

  1. Go to:

Home > Setup > Company/Organization
  1. Scroll to the logo section.

  2. Upload a clean, resized (max 300px width) PNG logo.

  3. Assign the logo.

  4. Save the page.

  5. Go to a module that uses the logo (e.g., Invoices), generate a PDF.

  6. Check if the logo is displayed.

If not:

  • Reopen PDF module configuration.

  • Reassign or clear the logo path.

  • Save and retry.

Handling Multi-Company Environments

If you use the MultiCompany module:

  • Each company profile has its own logo settings.

  • Switch context to each company.

  • Repeat the logo setup steps per company.

Check the file paths:

/documents/mycompany/company_id/logos/logo.png

Make sure logos are placed in the right directory for each company.

Custom Logo Paths in Templates

Advanced users often modify PDF or HTML templates.

  • In customized templates, ensure logo paths use dol_buildpath() or $conf->mycompany->dir_output

  • Avoid hardcoding absolute paths that break on updates

Automated Fix Using CLI

You can automate logo assignment via SQL or CLI scripts:

UPDATE llx_const SET value='logos/logo.png' WHERE name='MAIN_INFO_SOCIETE_LOGO';
  • Then clear caches or restart web services

Document Template Maintenance After Upgrade

Each Dolibarr upgrade may overwrite or modify default PDF template files:

  • Reapply your logo settings

  • Keep a backup of your /core/modules/facture/doc/ or /doc/ folders

Use version control if you maintain custom templates.

Tips for a Robust Logo Strategy in Dolibarr

  1. Keep a consistent logo filename (avoid spaces/special characters).

  2. Use optimized PNG files under 150KB.

  3. Maintain a folder structure like logos/logo.png, logos/logo_small.png.

  4. Document logo locations per company if using MultiCompany.

  5. Create a README file in your /documents/mycompany for reference.

Conclusion: Keep Your Brand Visible and Intact

Logo visibility is essential for professionalism, trust, and branding. While Dolibarr updates can sometimes disrupt logo display due to theme, configuration, or template changes, the issue is almost always resolvable through structured troubleshooting.

By understanding where and how Dolibarr stores, references, and renders logos, you can quickly identify the root cause of display issues and restore your company’s visual identity across all modules and outputs.

Whether you're managing a single company or running a multi-company setup, following the steps in this guide ensures your logos remain present, polished, and aligned with your brand—even after major version upgrades.

Comments

Log in or register to post comments