Layout import doesn't work

CMS Version and Installation Method

I have installed the CMS version 3.0.3 on a bare metal kubernetes cluster using the following deployment definition:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: xibo-cms
spec:
  replicas: 3
  selector:
    matchLabels:
      app: xibo-cms
  template:
    metadata:
      labels:
        app: xibo-cms
      annotations:
        backup.velero.io/backup-volumes: theme,library,custom
    spec:
      containers:
        - name: xibo-cms
          image: xibosignage/xibo-cms:release-3.0.3
          envFrom:
            - secretRef:
                name: xibo-env
          env:
            - name: MYSQL_USER
              valueFrom:
                secretKeyRef:
                  name: xibo-mysql-secret
                  key: USER
            - name: MYSQL_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: xibo-mysql-secret
                  key: PASSWORD
            - name: XMR_HOST
              value: xibo-xmr-intern
            - name: CMS_USE_MEMCACHED
              value: "true"
            - name: MEMCACHED_HOST
              value: memcached
          volumeMounts:
            - name: custom
              mountPath: /var/www/cms/custom
            - name: theme
              mountPath: /var/www/cms/web/theme/custom
            - name: library
              mountPath: /var/www/cms/library
      volumes:
        - name: theme
          persistentVolumeClaim:
            claimName: xibo-cms-theme
        - name: library
          persistentVolumeClaim:
            claimName: xibo-cms-library
        - name: custom
          persistentVolumeClaim:
            claimName: xibo-cms-custom

Issue

The CMS seems to be functional. I can register displays and the scheduled layouts get displayed correctly but I couldn’t import a layout I received into my CMS installation. After the progress bar is complete the dialog doesn’t change anymore, and the layout isn’t shown in the layout list no matter how long I wait.


Here the layout in question.

I found an error in the logs, but I can’t make sense of it. It seems to call a function on a null reference:

201,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Loading 1. All Objects = 0",,DEBUG
202,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Install Fonts called with options: {"invalidateCache":false}",,DEBUG
203,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"CMS font CSS returned from Cache.",,DEBUG
204,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Import Layout",,DEBUG
205,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Upload complete for f6aec9a3d329.zip.",,DEBUG
206,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Create Layout from ZIP File: /var/www/cms/library/temp/f6aec9a3d329.zip, imported name will be .",,DEBUG
207,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Loading Layout by XLF",,DEBUG
208,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"Call to a member function getAttribute() on null",,ERROR
209,3ef34b0,"2021-10-13 10:27:34",WEB,/layout/import,POST,"#0 /var/www/cms/lib/Factory/LayoutFactory.php(1136): Xibo\Factory\LayoutFactory->loadByXlf(false)
#1 /var/www/cms/lib/Helper/LayoutUploadHandler.php(82): Xibo\Factory\LayoutFactory->createFromZip('/var/www/cms/li...', '', 1, 0, 0, 0, 'o', 0, Object(Xibo\Controller\Library), '', Object(Slim\Routing\RouteParser))
#2 /var/www/cms/lib/Helper/BlueImpUploadHandler.php(650): Xibo\Helper\LayoutUploadHandler->handle_form_data(Object(stdClass), 0)
#3 /var/www/cms/lib/Helper/BlueImpUploadHandler.php(840): Xibo\Helper\BlueImpUploadHandler->handle_file_upload('/tmp/phpPKhLgp', 'f6aec9a3d329.zi...', 1935, 'application/zip', 0, 0, NULL)
#4 /var/www/cms/lib/Helper/BlueImpUploadHandler.php(142): Xibo\Helper\BlueImpUploadHandler->post()
#5 /var/www/cms/lib/Helper/BlueImpUploadHandler.php(125): Xibo\Helper\BlueImpUploadHandler->initialize()
#6 /var/www/cms/lib/Controller/Layout.php(2390): Xibo\Helper\BlueImpUploadHandler->__construct(Array)
#7 [internal function]: Xibo\Controller\Layout->import(Object(Slim\Http\ServerRequest), Object(Slim\Http\Response))
#8 /var/www/cms/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array(Array, Array)
#9 /var/www/cms/vendor/php-di/slim-bridge/src/ControllerInvoker.php(47): Invoker\Invoker->call(Array, Array)
#10 /var/www/cms/vendor/slim/slim/Slim/Routing/Route.php(384): DI\Bridge\Slim\ControllerInvoker->__invoke(Array, Object(Slim\Http\ServerRequest), Object(Slim\Http\Response), Array)
#11 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle(Object(Slim\Http\ServerRequest))
#12 /var/www/cms/lib/Middleware/FeatureAuth.php(75): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest))
#13 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\FeatureAuth->process(Object(Slim\Http\ServerRequest), Object(Slim\MiddlewareDispatcher))
#14 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#15 /var/www/cms/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest))
#16 /var/www/cms/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run(Object(Slim\Http\ServerRequest))
#17 /var/www/cms/vendor/akrabat/ip-address-middleware/src/IpAddress.php(91): Slim\Routing\RouteRunner->handle(Object(Slim\Http\ServerRequest))
#18 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): RKA\Middleware\IpAddress->process(Object(Slim\Http\ServerRequest), Object(Slim\Routing\RouteRunner))
#19 /var/www/cms/lib/Middleware/Actions.php(176): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#20 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Actions->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#21 /var/www/cms/lib/Middleware/Theme.php(70): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#22 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Theme->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#23 /var/www/cms/lib/Middleware/CsrfGuard.php(121): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#24 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\CsrfGuard->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#25 /var/www/cms/lib/Middleware/AuthenticationBase.php(78): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#26 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\AuthenticationBase->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#27 /var/www/cms/lib/Middleware/State.php(87): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#28 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\State->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#29 /var/www/cms/lib/Middleware/Log.php(59): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#30 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Log->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#31 /var/www/cms/vendor/slim/twig-view/src/TwigMiddleware.php(125): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#32 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Views\TwigMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#33 /var/www/cms/lib/Middleware/Storage.php(61): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#34 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Storage->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#35 /var/www/cms/lib/Middleware/Xmr.php(67): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#36 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Xmr->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#37 /var/www/cms/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#38 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#39 /var/www/cms/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#40 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous))
#41 /var/www/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Http\ServerRequest))
#42 /var/www/cms/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest))
#43 /var/www/cms/vendor/slim/slim/Slim/App.php(199): Slim\App->handle(Object(Slim\Http\ServerRequest))
#44 /var/www/cms/web/index.php(128): Slim\App->run()
#45 {main}",,DEBUG

I looked inside the mounted volume and under the given path the given ZIP archive exists:

/var/www/cms/library/temp # ls
b87b7863ca          f6aec9a3d329.zip    fontcss_42e7b35ea6  fontcss_81166587f2  fontcss_a015bed066  fontcss_f6b6cdad8c  log_9d2a522f58

I tried to scale the deployment down to one replica, in case that caused the error, but the problem persisted.

Kind regards and thank you for your time.

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