[SOLVED] Can't get custom skin to work

Moderator: crythias

Post Reply
lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

[SOLVED] Can't get custom skin to work

Post by lido » 25 Oct 2017, 18:37

Hi there,

I'm using otrs 6 beta 2 and have thoroughly followed the instructions for this.

So, I have a custom folder with css and img folders inside it.
Inside the css folder is a Core.Header.css file with some changes.
Inside the img folder is a different logo image.
I've also created /Kernel/Config/Files/CustomSkin.xml exactly as documented.
I then ran "/bin/otrs.Console.pl Maint::Config::Rebuild" as the otrs user, also exactly as documented.

Unfortunately, I can't see my custom skin on the skin selection screen on my profile options or anywhere inside SysConfig.

I've also ran the following commands, that I found on this thread that appeared to have the same issue.

/opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete
/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheCleanup
/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheGenerate

Still, it appears as otrs doesn't detect the new skin or creates the logo option.

Any ideas on what I'm doing wrong?

Thanks
Last edited by lido on 27 Oct 2017, 12:55, edited 1 time in total.

zzz
OTRS wizard
Posts: 189
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin
Company: maxence business consulting GmbH
Contact:

Re: Can't get custom skin to work

Post by zzz » 26 Oct 2017, 07:50

Hello lido,

you also have to create this config file: Kernel/Config/Files/XML/CustomSkin.xml.

You can use this pattern https://github.com/OTRS/otrs/blob/rel-6 ... 166-L12177

Good luck
Last edited by zzz on 24 Nov 2017, 11:59, edited 1 time in total.

lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

Re: Can't get custom skin to work

Post by lido » 26 Oct 2017, 10:31

Hi zzz, thanks for the reply.

I had created the CustomSkin.xml file inside "Kernel/Config/Files" and not inside "Kernel/Config/Files/XML" since that's how it's described on the developers manual. (here)

But I have now moved the file to that location you specified but I still cannot see my skin anywhere in the system. For example, on my user's profile settings page I see only the Default, Default-slim, High Contrast, Ivory and Ivory-slim skins.

This is a brand new otrs installation and I've done practically no changes except for configuring some postmaster emails and queues.

Any other ideas?

Thanks.

zzz
OTRS wizard
Posts: 189
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin
Company: maxence business consulting GmbH
Contact:

Re: Can't get custom skin to work

Post by zzz » 26 Oct 2017, 10:49

Last edited by zzz on 24 Nov 2017, 12:00, edited 1 time in total.

lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

Re: Can't get custom skin to work

Post by lido » 26 Oct 2017, 11:14

Hi again,

I've placed the file on both locations but still nothing.

Here's my initial xml file:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Changes">
    <ConfigItem Name="AgentLogo" Required="0" Valid="1">
        <Description Translatable="1">The logo shown in the header of the agent interface. The URL to the image must be a relative URL to the skin image directory.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Agent</SubGroup>
        <Setting>
            <Hash>
                <Item Key="URL">skins/Agent/lidotours/img/lido-tours-logo.svg</Item>
                <Item Key="StyleTop">13px</Item>
                <Item Key="StyleRight">75px</Item>
                <Item Key="StyleHeight">67px</Item>
                <Item Key="StyleWidth">244px</Item>
            </Hash>
        </Setting>
    </ConfigItem>
    <ConfigItem Name="Loader::Agent::Skin###100-lidotours" Required="0" Valid="1">
        <Description Translatable="1">Custom skin for Lido Tours.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Agent</SubGroup>
        <Setting>
            <Hash>
                <Item Key="InternalName">lidotours</Item>
                <Item Key="VisibleName">Lido Tours</Item>
                <Item Key="Description">Lido Tours custom skin.</Item>
                <Item Key="HomePage">https://www.lido-tours.com</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>
I've also noticed that the XML example snippet that you linked from Framework.xml was a bit different that what's documented.
For example the SubGroup was "Frontend::Agent" on the docs and on your example it's "Frontend::Base::Loader".
Also your example shows otrs_config version="2.0" and the docs say 1.0.
I've tried changing my xml as follows to reflect that:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="2.0" init="Changes">
    <ConfigItem Name="AgentLogo" Required="0" Valid="1">
        <Description Translatable="1">The logo shown in the header of the agent interface. The URL to the image must be a relative URL to the skin image directory.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Agent</SubGroup>
        <Setting>
            <Hash>
                <Item Key="URL">skins/Agent/lidotours/img/lido-tours-logo.svg</Item>
                <Item Key="StyleTop">13px</Item>
                <Item Key="StyleRight">75px</Item>
                <Item Key="StyleHeight">67px</Item>
                <Item Key="StyleWidth">244px</Item>
            </Hash>
        </Setting>
    </ConfigItem>
    <ConfigItem Name="Loader::Agent::Skin###100-lidotours" Required="0" Valid="1">
        <Description Translatable="1">Custom skin for Lido Tours.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Base::Loader</SubGroup>
        <Setting>
            <Hash>
                <Item Key="InternalName">lidotours</Item>
                <Item Key="VisibleName">Lido Tours</Item>
                <Item Key="Description">Lido Tours custom skin.</Item>
                <Item Key="HomePage">https://www.lido-tours.com</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>
Basically just changed the subgroup as per your suggestions.

I've placed the file on both locations and ran:

Code: Select all

/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
/opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete
/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheCleanup
/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheGenerate
Nevertheless, the skin still doesn't show up on the system :-/

zzz
OTRS wizard
Posts: 189
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin
Company: maxence business consulting GmbH
Contact:

Re: Can't get custom skin to work

Post by zzz » 26 Oct 2017, 11:31

Hello lido,

the version 6 is in beta, therefore the doc is still incomplete.
... version="2.0"... is the tag for OTRS 6.

The config file you've posted is 'Kernel/Config/Files/CustomSkin.xml' and correct.
You also need to create 'Kernel/Config/Files/XML/CustomSkin.xml' with a slightly different syntax (see my example above).

Good luck

lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

Re: Can't get custom skin to work

Post by lido » 26 Oct 2017, 11:59

Hi zzz, it seems that it just doesn't work.

Since the docs are wrong or outdated I'll just give up on creating the new skin for now since I tried pretty much everything including what you've stated on your last reply.

I'll try again later once the docs have been updated with the correct information or the issue (if it exists) fixed.

Thanks for trying to help.

zzz
OTRS wizard
Posts: 189
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin
Company: maxence business consulting GmbH
Contact:

Re: Can't get custom skin to work

Post by zzz » 26 Oct 2017, 12:09

Hello lido,

does your structure look like this?
/path_to_otrs/var/httpd/htdocs/skins/Agent/lidotours/css/Core.Header.css

The value of 'InternalName' must be identical to the folder name.

Could you also post XML/CustomSkin.xml?

lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

Re: Can't get custom skin to work

Post by lido » 26 Oct 2017, 13:55

Hi,

I've removed all previous files and started with the custom skins from scratch and have now been able to make it work.
It appears that it was indeed some issue with the format of the xml files as you've initially stated.
Unfortunately it appears as the documentation still doesn't reflect the correct way to do it.

Anyway, here are both xml files in case anybody else has this issue.

on "/Kernel/Config/Files/LidotoursSkin.xml":

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Changes">
	<ConfigItem Name="AgentLogoCustom###lidotours" Required="0" Valid="0">
        <Description Translatable="1">The logo shown in the header of the agent interface for the skin "lidotours".</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Agent</SubGroup>
        <Setting>
            <Hash>
                <Item Key="URL">skins/Agent/lidotours/img/lido-tours-logo.png</Item>
                <Item Key="StyleTop">21px</Item>
                <Item Key="StyleRight">29px</Item>
                <Item Key="StyleHeight">55px</Item>
                <Item Key="StyleWidth">230px</Item>
            </Hash>
        </Setting>
    </ConfigItem>
    <ConfigItem Name="Loader::Agent::Skin###100-lidotours" Required="0" Valid="1">
        <Description Translatable="1">Lido Tours skin for the agent interface.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Base::Loader</SubGroup>
        <Setting>
            <Hash>
                <Item Key="InternalName">lidotours</Item>
                <Item Key="VisibleName" Translatable="1">Lido Tours</Item>
                <Item Key="Description" Translatable="1">Lido Tours skin.</Item>
                <Item Key="HomePage">www.lido-tours.com</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>
And on "/Kernel/Config/Files/XML/LidotoursSkin.xml":

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="2.0" init="Changes">	
    <Setting Name="AgentLogoCustom###lidotours" Required="0" Valid="1">
        <Description Translatable="1">The logo shown in the header of the agent interface for the skin "lidotours".</Description>
        <Navigation>Frontend::Agent</Navigation>
        <Value>
            <Hash>
                <Item Key="URL">skins/Agent/lidotours/img/lido-tours-logo.png</Item>
                <Item Key="StyleTop">21px</Item>
                <Item Key="StyleRight">29px</Item>
                <Item Key="StyleHeight">55px</Item>
                <Item Key="StyleWidth">230px</Item>
            </Hash>
        </Value>
    </Setting>
	<Setting Name="Loader::Agent::Skin###100-lidotours" Required="0" Valid="1">
        <Description Translatable="1">Default skin for the lidotours agent interface.</Description>
        <Navigation>Frontend::Base::Loader</Navigation>
        <Value>
            <Hash>
                <Item Key="InternalName">lidotours</Item>
                <Item Key="VisibleName" Translatable="1">Lido Tours</Item>
                <Item Key="Description" Translatable="1">Lido Tour custom skin.</Item>
                <Item Key="HomePage">www.lido-tours.com</Item>
            </Hash>
        </Value>
    </Setting>
</otrs_config>
Both files have pretty much all the same data except for some different tags which is strange, but hey it's working now! :)

Thanks a lot @zzz for your help and useful hints.

zzz
OTRS wizard
Posts: 189
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin
Company: maxence business consulting GmbH
Contact:

Re: [SOLVED] Can't get custom skin to work

Post by zzz » 14 Feb 2018, 01:06

Just in case someone finds this old solution through a search engine:
viewtopic.php?f=62&t=38874#p157519

Post Reply