2

I use Craft Pro CMS 3.7.39 [edit: now updated to Craft Pro CMS 3.7.42] in headless mode. Worked fine for some weeks now - but without configuration or code change some of many sections entry lists failes to load. The loading spinner keeps spinning - after ~1 minute a empty entry list is loaded. There are ~ 3000 entries in the database.

empty entry list is loaded

Nginx, PHP-FPM and MySQL logs are clean. :(

System Info

any ideas how to figure out thats going on?

edit 1

there is a little error banner: a server error occoured

edit 2

in the browser log there is one XHR Request, that dosnt return - i think thats the error:

enter image description here

edit 3

graphql is successfully able to query the sections that do not work in the admin gui. so the database part cloud be okay.

edit 4

this is the .env file

# The environment Craft is currently running in (dev, staging, production, etc.)
ENVIRONMENT=dev

# The application ID used to to uniquely store session and cache data, mutex locks, and more
APP_ID=XXXXX

# The secure key Craft will use for hashing and encrypting data
SECURITY_KEY=XXXX

# Database Configuration
DB_DRIVER=mysql
DB_SERVER=XXXX
DB_PORT=XXXX
DB_DATABASE=XXXX
DB_USER=XXXX
DB_PASSWORD=XXXX
DB_SCHEMA=XXXX
DB_TABLE_PREFIX=XXXX

CRAFT_CMS_URL=https://craft.xxxxx.de
CRAFT_CMS_ROOT=/srv/www/xxxxx_craft/web

this is the general.php

<?php
/**
 * General Configuration
 *
 * All of your system's general configuration settings go in here. You can see a
 * list of the available settings in vendor/craftcms/cms/src/config/GeneralConfig.php.
 *
 * @see \craft\config\GeneralConfig
 */

use craft\helpers\App;

$isDev = App::env('ENVIRONMENT') === 'dev';
$isProd = App::env('ENVIRONMENT') === 'production';

return [
    // Default Week Start Day (0 = Sunday, 1 = Monday...)
    'defaultWeekStartDay' => 1,

    // Whether generated URLs should omit "index.php"
    'omitScriptNameInUrls' => true,

    // The URI segment that tells Craft to load the control panel
    'baseCpUrl' =>  null,
    'cpTrigger' => 'admin',

    // The secure key Craft will use for hashing and encrypting data
    'securityKey' => App::env('SECURITY_KEY'),

    // Whether Dev Mode should be enabled (see https://craftcms.com/guides/what-dev-mode-does)
    'devMode' => $isDev,

    // Whether administrative changes should be allowed
    'allowAdminChanges' => $isDev,

    // Whether crawlers should be allowed to index pages and following links
    'disallowRobots' => !$isProd,

    // Whether the system should run in Headless Mode, which optimizes the system and control panel for headless CMS implementations.
    'headlessMode' => true,
    'limitAutoSlugsToAscii' => true,

    // Whether the EXIF data should be preserved when manipulating and uploading images.
    'preserveExifData' => true,
//    'defaultDirMode' => '2775',

    'aliases' => [
        '@web' => App::env('CRAFT_CMS_URL') ? App::env('CRAFT_CMS_URL') : null,
        '@webroot' => App::env('CRAFT_CMS_ROOT') ? App::env('CRAFT_CMS_ROOT') : null,
    ]
];

edit 5

both site configurations:

both site configurations

edit 6

section configuration: section configuration

edit 7

here you see the console output in the error case  error case

here you see the console output in the no error case  no error case

XHR the index.php?admin/actions/.../get-elements/ fail to return ANY value.

edit 8

  • there are no relevant errors in web.log.

web.log

  • there are no relevant errors in /storage/logs/phperrors.log
  • there are no relevant errors in /var/log/php7.3-fpm.log
  • there are no relevant errors in /var/log/nginx/XXXXX_craft.error.log
  • there are no relevant errors in /var/log/mysql/error.log
13
  • Not in all cases an empty list is loaded. If i open a other entry view before the faulty one - the previous list stays
    – Merkur
    May 18, 2022 at 11:49
  • Hey Merkur, how is your config (env & general.php)? Whats the url and what did you set as siteUrl? Did you set the url of the backend? Maybe https issues? Is there any output in the console? May 18, 2022 at 14:21
  • Hello Max, I added .env and general.php to the post. nothing crazy there I belive. I use Craft CMS in headless mode only - the section urls are just defined by the entry id. there are 2 sites a german and a english variation they are configured as sub directories of the the craft cms url @web
    – Merkur
    May 19, 2022 at 8:42
  • Updated to Version Craft Pro CMS 3.7.42 - nothing changed :(
    – Merkur
    May 19, 2022 at 9:49
  • 1
    Hello Max, thank you for your time and questions. I'll try to get help from the developers.
    – Merkur
    May 19, 2022 at 15:30

1 Answer 1

1

I solved the problem. The reason CrafCMS did not log any error, is that there is no craft error. :) The SSL Certificate to the XHR was blocked by some combination effect between Firefox and the AntiVir System. Without AntiVir Software or in Chrome it runs great.

The error message "a server error occured" was missleading, because it was a client connection error.

thank you for your help / Merkur

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.