Error with design Tab after a couple of saves

Well I have an issue when I have tried to play with the css a little bit and after a couple of saves the design tab just crashed with this error:

Environment:


Request Method: GET
Request URL: https://panel.lielxd.com/base/design

Django Version: 3.1.3
Python Version: 3.8.10
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'baseTemplate',
 'loginSystem',
 'packages',
 'websiteFunctions',
 'tuning',
 'serverStatus',
 'dns',
 'ftp',
 'userManagment',
 'databases',
 'mailServer',
 'serverLogs',
 'firewall',
 'backup',
 'managePHP',
 'manageSSL',
 'api',
 'filemanager',
 'manageServices',
 'pluginHolder',
 'emailPremium',
 'emailMarketing',
 'cloudAPI',
 'highAvailability',
 's3Backups',
 'dockerManager',
 'containerization',
 'CLManager',
 'IncBackups']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'CyberCP.secMiddleware.secMiddleware']



Traceback (most recent call last):
  File "/usr/local/CyberCP/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/CyberCP/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/CyberCP/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/CyberCP/baseTemplate/views.py", line 312, in design
    sha = sha_res.json()[0]['sha']

Exception Type: KeyError at /base/design
Exception Value: 0

I have tried to upgrade cyberpanel and deleted the themes directly from the database with no success.
can anyone help me see where the problem is?

I get the same error in the version management as well.

OS: ubuntu 22.04
CyberPanel: v2.3.5 (latest commit)

there must be some error in your edition that’s why design crashed

I just saved a couple of css lines and it crashed.
I saved the css with some code and it worked then removed some styles and saved again to see how it looks and it crashed.

currently I can enter the design tab but when I save the styles nothing happenes no matter what I do.

I have managed to fix it by dropping the table baseTemplate_cyberpanelcosmetic
and then make an upgrade to cyberpanel to regenerate the table.

this fixed the problem.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.