Open basemhegazy opened 10 months ago
It's been about a year since the original post, and I also noticed this error recently when I started to work with Vendure for the first time.
I'd like to add that the custom brand-name also gets overwritten by Vendure brand-name when hideVendureBranding:false
This might be intentional, and it would be logical if the brand-name was not set.
But shouldn't the logic be that if the brand-field is not an empty string or undefined, then the custom brand name should always overwrite the Vendure-brand name, regardless of hideVendureBranding?
Another side-issue is that if the brand name is too long, the Admin UI login-form text wraps but there is no spacing between the lines.
EDIT: Sorry, the issue I was referencing to was about the logos disappearing with hideVendureBranding:true
, not the file-naming conflict.
Environment
Description
When using the
setBranding
function as per the instructions in the documentation to add custom logos and favicon, I get the error below. I also noticed that the logos get disabled when I set the value ofhideVendureBranding
to true.Error: Source and destination must not be the same.
I figured out that the problem was a file naming conflict. Custom images and files cannot have the same filename as the existing original files. In my case, the
favicon.ico
. file had the same filename as the original, and this was causing the error. After renaming the file to something likecustom-favicon.ico
, the problem was solved. I was able to reproduce the error by renaming it back tofavicon.ico
. I also had to sethideVendureBranding: false
in order for the custom logos to show.To Reproduce
AdminUiPlugin.init
section in vendure-config.ts configuration file to match the following:npm run dev
and check the error message.npm run dev
again and see if the error is gone.hideVendureBranding
value tofalse
. Then, check again. You should now be able to see your custom logos.You may still only see your customfavicon.ico
, though.Run your test with the following configurations first to reproduce the problem:
If you cannot see your logos change it to:
Expected behavior
Vendure must show the custom logos and the favicon from
setBranding
along with your branding options from theadminUiConfig
if thehideVendureBranding
is set totrue
.Environment