Field user_picture is unknown.

Created on 11 December 2023, about 1 year ago
Updated 18 December 2023, about 1 year ago

Hi All

I have in my sytem:
Apache Version 2.4.58
MySQL Version 10.5.21-MariaDB-cll-lve
PHP 8.2

I am installing with composer command line as follows:
composer create-project opigno/opigno-composer:3.1.0 .

After puting in the web site name and admin user name and password I get:

The website encountered an unexpected error. Please try again later.

InvalidArgumentException: Field user_picture is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).

Drupal\Core\Entity\ContentEntityBase->get() (Line: 588)
Drupal\opigno_statistics\Services\UserStatisticsManager::getUserPicture() (Line: 143)
Drupal\opigno_statistics\Controller\UserController->buildUserInfo() (Line: 1421)
Drupal\opigno_statistics\Controller\UserController->index()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)

https://www.drupal.org/project/opigno_lms/issues/3217979
This is the same issue as linked but that is marked as fixed.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇬🇧United Kingdom Thuthuka

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Thuthuka
  • 🇬🇧United Kingdom Thuthuka

    I have been comparing my composer install with an opigno/cli Docker image.

    The composer install did not create the following tables that are present in the Docker image.
    cache_dynamic_page_cache
    cache_group_permission
    cache_page
    cache_signal
    cache_toolbar
    cache_ultimate_cron_logger
    user__user_picture

    After some online searching I found this thread
    https://www.drupal.org/project/opigno_lms/issues/3263598

    after reading #22 and #24

    I did the following command:
    composer create-project opigno/opigno-composer:3.1.* . --no-install

    edit composer.json to match this
    ------------------------
    "require-dev": {
    "drush/drush": "^10",
    "mglaman/composer-drupal-lenient": "^1.0"
    },
    ------------------------

    and then the following command:
    composer install --ignore-platform-req php

    This has made all the tables and an install that appears to work.

Production build 0.71.5 2024