cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom theme import failed via theme designer

mstancheva15
Newcomer
0 Likes
839

Hi,

I am trying to import a custom theme via transaction UI5/THEME_TOOL on an on-premise system. However, I am getting the following error and have no clue what is causing it:

mstancheva15_0-1718098501504.png

If I try to import the theme via the theme designer directly (UI5/THEME_DESIGNER), while I save the theme all custom changes are gone.

Can you please help me what might be causing this error?

Accepted Solutions (0)

Answers (1)

Answers (1)

dominikschreiber
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi @mstancheva15! I'm just guessing based on the error message you provided "This zip-file contains more than on theme. Upload rejected.".

This error is thrown, like it says, when the zip you import contains more than one theme.

Maybe my blog post What is a theme, anyways? can give a bit of background on the structure in the zip (knowing that the zip basically contains a theming repository). More or less, the zip contains folders ("frameworks") that contain folders ("libraries") that contain folders ("themes") that contain less files or resources ("files"), e.g.

Base # <- framework
└─baseLib # <- library
  └─ my_theme # <- theme
    ├─base.less # <- file
    └─…
UI5 # <- framework
├─sap/ui/core/themes # <- library (almost…)
│ └─my_theme # <- theme
│   ├─library.less # <- file
│   └─…
└─sap/m/themes # <- library (…)
  └─my_theme # <- theme
    ├─library.less # <- file
    └─…
UR # <- framework
├─baseLib # <- library
│ └─my_theme # <- theme
│   ├─standards.less # <- file
│   └─…
├─ls # <- library
│ └─my_theme # <- theme
│   ├─standards.less # <- file
│   └─…
└─c2 # <- library
  └─my_theme # <- theme
    ├─standards.less # <- file
    └─…

(It's a bit more complicated, the structure of each framework is defined by the sSourcePathPattern of this frameworks .theming file, see e.g. the one of the Base framework, but for the sake of this answer the above is enough.)

So: the error is saying that in your zip file there is some library of some framework that contains a folder (i.e. a theme) that is named different than the folders of all other libraries of all other frameworks in your zip file. In my example that could be

Base/baseLib/my_theme
UI5/sap/ui/core/themes/my_theme
UI5/sap/m/themes/my_theme
UI5/sap/m/themes/my_theme2 # <- whoops, this is a different theme
UR/baseLib/my_theme
UR/ls/my_theme
UR/c2/my_theme

If importing a fresh export of your theme from the theme designer doesn't solve the problem, you would have to clean your zip manually, i.e.

  • unzip your exported theme
  • look for the different theme and remove it
  • zip the cleaned-up folder
  • and import that with /UI5/THEME_TOOL.