Giter Site home page Giter Site logo

clarity-h2020 / docker-drupal Goto Github PK

View Code? Open in Web Editor NEW
3.0 16.0 0.0 190 KB

Drupal 8 Project for implememting the CLARTIY CSIS Platform.

Home Page: https://csis.myclimateservice.eu

License: GNU Lesser General Public License v3.0

Dockerfile 48.84% Shell 51.16%
horizon2020 drupal-8 climate-change building-block extended-component

docker-drupal's Introduction

docker-drupal

Drupal 8 Project for implementing the CLARITY Climate Services Information System (CSIS).

Description

This repository contains the general configuration for CSIS docker containers deployed at CSIS Development System and CSIS Production System virtual servers.

The actual drupal site configuration which is mapped to the bind-mount volume drupal-data is stored in the separate private clarity-csis-drupal repository. This repository is mainly used for synchronising configuration and content between the development and production system.

Implementation

CLARTIY CSIS is implemented as dockerized Drupal 8 with PostGIs database. The initial configuration is based on Continuous Drupal. The main artefacts of the repository are

Deployment

CLARTIY CSIS is deployed as docker containers csis-drupal and csis-postgis on CSIS Development System and CSIS Production System virtual servers. A separate nginx-proxy exposes the internal Drupal Apache service to csis-dev.myclimateservice.eu and csis.myclimateservice.eu.

Building the Docker Images

Building the drupal and postgis docker image is straightforward:

cd /docker/100-csis
docker-compose build

Configuring and starting the containers

Containers are managed via the customised docker-compose.yml. The actual configuration is maintained in an .env file while .env.sample can be used as blueprint of this configuration file. Variables in this file will be substituted into docker-compose.yml.

The configuration on the development and production system is identical, except for the environment variables VIRTUAL_HOST and LETSENCRYPT_HOST required by nginx-proxy. Example for development system:

VIRTUAL_HOST=csis-dev.ait.ac.at,csis-dev.clarity.cismet.de,csis-dev.myclimateservice.eu
LETSENCRYPT_HOST=csis-dev.ait.ac.at,csis-dev.clarity.cismet.de,csis-dev.myclimateservice.eu

The containers can be started with:

docker-compose up -d --force-recreate --remove-orphans

Data Volumes

Data of different containers is stored in the following bind-mount volumes:

  • Drupal site configuration in /docker/100-csis/drupal-data/
  • postgres database in /docker/100-csis/postgresql_data/

Tests and Monitoring

Integration Tests

UI Integration Tests both for the deployed development and production system are performed with help of cypress.io and executed on Jenkins CI. The test specifications are maintained in repository csis-technical-validation in branches csis-cypress and csis-dev-cypress. If any of the test fails, the CI system will automatically post a new issue in the repository.

Service Monitoring

CSIS Services are monitored with help of statping. The monitoring services are also integrated in Jenkins CI and a new issue is posted in repository csis-technical-validation when one of the monitored services fails.

Backups

Apart from the general virtual server backups performed by AIT data center, daily full backups of the CSIS data volumes stored at /docker/100-csis are saved in /docker/100-csis-daily.tar.gz. Additional incremental backups can be performed with help of docker-duplicity.

Upgrading

Upgrading the system is a multi-step process that involves not only updating the container images but also the Drupal core system as such as well custom and integrated apps and modules.

Docker Images

Stop and remove drupal containers:

cd /docker/100-csis
docker-compose down

Manually trigger incremental duplicity backup:

cd /docker/999-duplicity
docker-compose up

Hint: You can restore the latest backup-set with docker-compose up -f restore.yml to ./restore directory.

Edit Drupal Dockerfile and change base image to docker-drupal new version. E.g. FROM drupal:8.9.1-apache for csis-drupal and FROM postgis/postgis:10-3.0 for csis-postgis.

Hint: This does not update the existing CSIS Drupal Core, since the actual Drupal system lives in a host-mounted ./drupal-data volume! Therefore a manual update inside the new running container is required. See upgrading Drupal Core and Modules.

Edit compose file and change custom images tags, e.g. to 8.9.1-apache and csis-postgis:10-3.0, in order to be able to revert to the previous image:

  drupal:
    image: csis-drupal:8.9.1-apache
    build:
      context: ./drupal
    container_name: ${COMPOSE_PROJECT_NAME}-drupal

Also upgrade csis-postgis image, if necessary.

  drupal-db:
    image: csis-postgis:10-3.0
    build:
      context: ./postgis
    container_name: ${COMPOSE_PROJECT_NAME}-postgis

Build our custom csis-drupal docker images:

cd /docker/100-csis
docker-compose build

Recreate containers:

docker-compose up -d --force-recreate --remove-orphans

Furthermore any changes to the docker and compose files have to be committed and a new release has to be made.

Drupal Core and Modules

The actual site configuration which includes the Drupal core system and the different modules lives in a separate bind-mount volume and has to be updated separately.

sh into csis-drupal container:

sudo su docker
docker exec -it --user 999 csis-drupal bash

Backup configuration on private clarity-csis-drupal repository:

# backup configuration
drush cex
git add --all
git commit -a -m "commit message"
git push
## Username for 'https://scm.atosresearch.eu'
## Password for 'https://[email protected]':

In general, Drupal Core and Modules can be updated with help of drush and composer:

composer update
drush updb

However, some of the modules had to be patched, so that the update process is not so straightforward. For more information refer to this issue .

Custom Modules and Apps

Currently, the following custom modules and integrated apps are deployed together with CSIS:

They have to be updated separately. Instruction for doing so are provided in the respective readme.md files in the repository root.

Synchronisation between DEV and PROD

The synchronisation between the development and production system consists of two separate steps for synchronising content and configuration.

Importing/Exporting configuration

NOTE: This issue discusses how to migrate configuration (e.g. site configuration like caching, configuration of Views and display & form modes, available fields in content types, ...) but not actual content (node A, Tax. term B). That is adressed in a separate issue (#147).

We're using the Configuration Split module to manage, which configuration will be enabled on the Dev or Prod server only and which will be enabled on both. Configuration will always be imported/exported completely as yaml files, but into different directories (inside /app/config/), which will (depending on the split settings) be used or ignored on the two environments. That way the configuration will always be completely available in our private Git repo.

Managing splits

Splits can be managed at /admin/config/development/configuration/config-split. We will have one split called dev_split. On the Dev server this split needs to be active, while on the Prod server it has to be deactivated. That will be handled in the settings.php by setting $config['config_split.config_split.dev_split']['status'] either "TRUE" or "FALSE".

The process in general

  1. Changes will be made on Dev server (e.g. a new field or a module will be enabled/disabled)
  2. View all the changes at /admin/config/development/configuration and: 2.a) If this change should not take effect on Prod, then the split needs to be configured to exclude the change (see Managing splits above) 2.b) If this change should take effect on Prod, the split doesn't require any changes.
  3. via terminal export the configuration using drush config-split:export (short: drush csex)
    Note: When asked whether to perform a normal (including filters) export, select YES. Confirm export by viewing pending configuration changes (as shown in step 2). This should now be empty.
  4. Push configuration to private repository and pull on Prod server
  5. Run composer install first if composer.json file changed, otherwise configuration import might fail
  6. If there are any new modules added by composer, they now need to be installed in Drupal via the "Extend" page in the Backend UI
  7. Import configuration via drush config-split:import (short: drush csim)
  8. check if updates in DB are necessary with drush updb
  9. clear cache with drush cr

Limitations

Due to the difficult selection possibilities in the UI of this module and unpredictable relationships between individual configuration files, it is not feasible to use this module for short-term differences in the configuration of both servers (like "new field was added but we don't want to yet include it in the upcoming synchronization"). It's difficult to achieve and very error-prone. This module is meant to be used for permanent differences in the config (like always disabling the Devel module and it sub-modules on the Prod server for security reasons).

Importing/Exporting content

NOTE: This issue discusses how to migrate actual content (nodes like data packages, resources etc. and taxonomy terms like the EU-GL taxonomy for example). Synchronizing configuration is discussed in issue #138 and needs to be completed BEFORE synchronizing content.

Overview

For synchronizing content we use the Migrate module, which is part of the Drupal Core and some of its additional modules (Migrate Plus and Migrate Tools). The content is pulled from the Dev via REST-Views (all called "Drupal-shared ...", which means that Dev needs to be accessible via HTTP.

The general workflow will be that certain nodes (GL-step templates, data packages and all their referenced entities) and all of the taxonomies will be exported in Dev and imported in Prod. The following actions are performed:

  • New elements will be created in Prod
  • Existing elements will be updated
  • Elements removed in Dev will also be removed in Prod
  • For synchronizing only published elements will be taken into account

Managing the migration configuration files

The target site (in our case the production system) needs for each content type the migration configuration stored in a .yml file (these .yml files are stored and synchronized with the other configuration .yml files, see #138). To add a new migration configuration:

  1. Create the yml file (use existing ones for reference)
  2. Add the file in the Drupal backend UI at .../admin/config/development/configuration/single/import (as configuration type select "Migration")
  3. Synchronize configuration between Dev and Prod (#138)
  4. If an existing migration needs to be changed, use the "Single item export" feature under same link as in (2) and export desired migration including the migration UUID, which will be needed for the re-import later after changes to file are done

Synchronization process

  1. in the Docker-container of Prod run either the provided bash script to synchronize all content in the correct order
  2. or synchronize individual content types using drush (make sure to migrate referenced items first!): drush mim [ID_of_Migration_file] --update

Things to know

  • --update argument can be omitted. In that case existing items will not be updated but instead be skipped
  • in case a migration gets stuck, its status can be reset with drush mrs [ID_of_Migration_file]
  • should a migration fail (e.g. content was removed in Prod and can't be found for lookup process) the migration can be rolled back with drush mr [ID_of_Migration_file]
  • --all argument can be used with drush mr or drush mrs to take affect on all migrations and not just one
  • drush ms lists all available migrations and their status and other details (can also be seen in Drupal BE)
  • under Structure -> Migrations (.../admin/structure/migrate) all migrations can also be viewed in the BE. It's also possible to remove individual migrations there.

License

MIT © Austrian Institute Of Technology, cismet GmbH and Smart Cities Consulting

docker-drupal's People

Contributors

p-a-s-c-a-l avatar patrickkaleta avatar therter avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-drupal's Issues

JSON:API vs. core's REST Module

According to this guide, it should be possible to access this node using Drupal 8's JSON:API via the following URI: https://csis.myclimateservice.eu/jsonapi/node/data-package/76

However, 404 Page not found is returned. Accessing the same node via the REST module does work: https://csis.myclimateservice.eu/node/76?_format=json

According to JSON:API vs. core's REST Module, the JSON:API should be the preferred method for accessing entities.

@fgeyer16 @patrickkaleta Could you please check why the JSON:API isn't working?
@therter Could you please make sure that the Map Component uses the JSON:API?

JSON API Authorisation Error

Accessing the HAL+JSON representation of an entity (e.g. /study/1?_format=hal_json) results in the following error although accessing the XML or plain JSON representation (e.g. /study/1?_format=json) does work:

{"message":"You are not authorized to view this group entity of bundle study."}

@fgeyer16 @patrickkaleta

Is there anything else to configure apart from these setting in REST UI:

grafik

Characterise Hazard missing in Study 1

Somehow step 1 'Characterise Hazard' disappeared from study 1:

grafik

Under Related entities for Adaptation Scenarios for Metropolitan Resilience Planning it is still shown but Study Group main navigation v2 (Taxonomy term) shows the following error:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "structure" LINE 9: ... ((group_content_field_data_node_field_data.gid = 'structure... ^: SELECT taxonomy_term__field_study_step.field_study_step_value AS taxonomy_term__field_study_step_field_study_step_value, taxonomy_term_field_data.tid AS tid, field_field_eu_gl_methodology_taxonomy_term_field_data.nid AS field_field_eu_gl_methodology_taxonomy_term_field_data_nid, group_content_field_data_node_field_data.id AS group_content_field_data_node_field_data_id, groups_field_data_group_content_field_data.id AS groups_field_data_group_content_field_data_id FROM {taxonomy_term_field_data} taxonomy_term_field_data LEFT JOIN {node__field_field_eu_gl_methodology} node__field_field_eu_gl_methodology ON taxonomy_term_field_data.tid = node__field_field_eu_gl_methodology.field_field_eu_gl_methodology_target_id AND node__field_field_eu_gl_methodology.deleted = :views_join_condition_0 LEFT JOIN {node_field_data} field_field_eu_gl_methodology_taxonomy_term_field_data ON node__field_field_eu_gl_methodology.entity_id = field_field_eu_gl_methodology_taxonomy_term_field_data.nid LEFT JOIN {group_content_field_data} group_content_field_data_node_field_data ON field_field_eu_gl_methodology_taxonomy_term_field_data.nid = group_content_field_data_node_field_data.entity_id AND group_content_field_data_node_field_data.type = :views_join_condition_1 LEFT JOIN {groups_field_data} groups_field_data_group_content_field_data ON group_content_field_data_node_field_data.gid = groups_field_data_group_content_field_data.id LEFT JOIN {taxonomy_term__field_study_step} taxonomy_term__field_study_step ON taxonomy_term_field_data.tid = taxonomy_term__field_study_step.entity_id AND taxonomy_term__field_study_step.deleted = :views_join_condition_2 WHERE ((group_content_field_data_node_field_data.gid = :group_content_field_data_gid)) AND ((taxonomy_term_field_data.status = :db_condition_placeholder_3) AND (taxonomy_term_field_data.vid IN (:db_condition_placeholder_4))) ORDER BY taxonomy_term__field_study_step_field_study_step_value ASC NULLS FIRST LIMIT 20 OFFSET 0; Array ( [:group_content_field_data_gid] => structure [:db_condition_placeholder_3] => 1 [:db_condition_placeholder_4] => eu_gl [:views_join_condition_0] => 0 [:views_join_condition_1] => study-group_node-gl_step [:views_join_condition_2] => 0 )

Managing Modules, Themes and AJAX Apps

At the moment the git repositories for modules and themes, e.g. csis-theme are referenced as git subtree in the general csis drupal repository docker-drupal (see #12 (comment) and #13 (comment))

Additionally, as described in React Integration in Drupal Page, the react apps and thus the react apps's git repositories currently reside in a subfolder of the csis-theme.

So we would end up with a subtree structure like:

So probably it would be better to switch to git submodules instead, but this approach has some caveats, too.

@fgeyer16 @patrickkaleta How are such issue addressed in other scm-controlled Drupal projects?

Basic Map Integration Example

Create a basic entity with country and study_area fields. Note: This basic entity will later be replaced by / integrated with the Study Group Type.

  • country field:
    • used to center the map shown in Mockup 0130 on a country selected by the user in in Mockup 0120
    • a reference to an entry in a countries vocabulary. Properties of the Country Taxonomy Type: name, country code, geom (type: Geofield), etc.
  • study_area field:
    • used for storing the spatial study area selected in Mockup 0130
    • a Geofield) attached to the Study Group Type) instance

Populate Countries Vocabulary (Taxonomy) with Couintry Data + Polygons, e.g. from #7 (comment)
Integrate React Map (e.g. Leaflet) via Module or iFrame (depending on the result of the evaluation).

Connect React Web App via Drupal REST API and / or JavaScript to Drupal Backend and implement the features for

  • setting and showing the polygon of the selected country on the react map
  • selecting the study area (bbox, polygon, etc.) in the react map and storing the geometry in the study_area field.

0120 cca _ study _ definition context end-user guide

0130 cca _ study _ area end-user guide

Containers do not start on Windows

Postgesql container does not start on Windows since the postgresql container expects the host-mounted pg_data dir residing on a unix filesystem while docker for windows host-mounts are smb shares mounted from windows host.

create content type "data package"

May be for the moment just an "empty" content type since the needed fields are not clear ( at least for me)
proposed fields:

  • a field containing the url to the metadata on ckan (link or just text? or iframe?)
  • References to properties. This has to be discussed on telco on 10th of September
  • maybe a field containing the metadata from ckan? If they are not changing frequently. Showing in Summary would be easier then.

Maps in Report

Evaluate possibilities to include a picture of the maps configured with hazard, exposure, etc. layers in the Report, e.g. store the WMS / WCS URLs of configured layers shown in the map application via REST API.

Problem with file permissions on server

There seems to be a problem with the file permissions on the server, leading to the website not being properly displayed (missing navigation for studies, wrong admin-toolbar in FE, CSS errors on modules-page etc).

Looks like the problem first occured on Wednesday (21.12.2018) around 11:30 a.m. Error is reproducible in local environment when using a new tar.gz files (created after Wednesday). Drupal log-files are not of much help, but the status report (/admin/reports/status) helped me solve this problem locally following these steps:

  1. status report first shows error "File system: The directory /tmp is not writable..."
    Fix: make folder "/drupal-tmp" writable

  2. status report now shows error "File system: The directory /app/private is not writable..."
    Fix: make folder "/drupal-data/private" writable

  3. status report now shows error "File system: The directory sites/default/files is not writable..."
    Fix: make folder "/drupal-data/web/sites/default/files" writable

After that the website is being displayed properly again.

@p-a-s-c-a-l , @fgeyer16 , @Itsman-AT
I don't know why this bug suddenly appeared and if my approach is the solution for this or just a workaround.

Taxonomies for Information Pages

Create the Vocabularies for "Information Pages" for describing the EU-GL Methodology, the Information on hazards, etc.

  • EU-GL Taxonomy
  • Sector Taxonomy
  • Exposure Taxonomy
  • Study Type Taxonomy
  • Hazards Taxonomy
  • Emission Scenario Taxonomy
  • Impact Taxonomy

WP3: Create the respective content, e.g. description of EU-GL Modules, Hazards, etc.**

This information will also be included in the report. E.g. create one taxonomy term for each EU-GL Module and a vocabulary for EU-GL, Same for Hazard, Exposure, etc. The vocabulary itself can have additional fields, e.g. 'description'.

@fgeyer16
Check if we can add more fields to a vocabulary.

SCC dissemination team: "polish" content and add pictures

Add User roles

as suggested by @fgeyer16 : for now we should have the following user roles:

  • Administrator (already exists): can do anything

  • Developer: can do almost anything (able to manipulate content types, views, taxonomies,...)

  • Editor: can create content & taxonomy terms

Automatically create all GL-Step entities when creating a new Study group

Added new functionality which creates all necessary GL-Step entities right after a new Study group is created by a user. Those entities receive a title (name of the EU-GL step) and the corresponding EU-GL taxonomy term. They also get assigned to the new group and the user who created that group.

@p-a-s-c-a-l
I noticed some inconsistencies between the EU-GL terms used in the mockup and the infographic used here: https://myclimateservices.eu/about-us (infographic is missing "Hazard - Local Effect", while mockup doesn't include steps 5-7). Any idea, how it is supposed to be?

For now, I combined those two adding the "Hazard - Local Effect" step into second place, leaving us with a total of 8 different GL-Steps.

Files created with REST API are only temporary

"File entities created by POSTing a base64-encoded image using the REST API are created as temporary files and cannot then be attached to another entity, and worse, are deleted after 6 hours." source

There is a patch attached to this comment, but it's not clear how to apply this in our Drupal instance.

Install Geofield Module in Drupal

Moved here from csis (05.02.2019):
In order get the map vi.sualisation for hazards and adaptation measures installed, we need to install the Geofield module in Drupal.

Report Generation

Generate PDFs out of a Drupal Page either using a special Drupal Module (if available) or use some external libraries like Jasper Reports and fetch the study data from the REST API.

Important: All information needed to generate a report should reside in the Group Type "Study".

We need more script memory

In the moment the php memory limit is at 128 MB. Trying to implement the automatic generation of group content I get an exhausted memory error.
So we definitely need more php memory. Lets try if memory_limit = 256M are enough.
Please somebody from AIT, who can do that on the server.Or is it an docker issue?

Warning: Manage display can brick view mode

Managing the display of a view mode can 'brick' it under certain circumstances leaving the display unusable and uneditable. To reproduce just try to create a display like shown in the following example:

grafik

Arranging the different groups (tabs, tab) and fields and getting them in the right order is a challenge on its own! Drag & Drop behaviour seems the be unpredictable so that the groups and fields don't appear in the hierarchy where you've put them. Even worse, what you see isn't always what you get! So after saving the view mode the arrangement of fields and groups may still be different than what is shown on the screen:

drupal-havok

This may lead to a situation where a container group (tabs) is put below a contained groups (tab) without the user even noticing. Such a situation may lead to some kind of endless loop rendering the display 'bricked'. An attempt to change the display will then yield the following error:

Fatal error: Maximum execution time of 30 seconds exceeded in /app/web/core/modules/field_ui/src/Element/FieldUiTable.php on line 64

@patrickkaleta @fgeyer16

Do you see any change to repair / recreate the following display: /admin/structure/types/manage/gl_step/display/sce
E.g. exporting with drush, changing the group order and re-importing again?

Scenario Analysis Tab not shown

The Scenario Analysis Tab in Risk and Impact Assessment GL-Step is not shown anymore. This is the filter configuration of the view Mode for GL-Step (Content):

grafik

The following error is shown:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "structure" LINE 6: ... ((group_content_field_data_node_field_data.gid = 'structure... ^: SELECT node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, group_content_field_data_node_field_data.id AS group_content_field_data_node_field_data_id FROM {node_field_data} node_field_data INNER JOIN {group_content_field_data} group_content_field_data_node_field_data ON node_field_data.nid = group_content_field_data_node_field_data.entity_id AND group_content_field_data_node_field_data.type = :views_join_condition_0 INNER JOIN {node__field_field_eu_gl_methodology} node__field_field_eu_gl_methodology ON node_field_data.nid = node__field_field_eu_gl_methodology.entity_id AND node__field_field_eu_gl_methodology.deleted = :views_join_condition_1 AND (node__field_field_eu_gl_methodology.langcode = node_field_data.langcode OR node__field_field_eu_gl_methodology.bundle = :views_join_condition_3) WHERE (((node__field_field_eu_gl_methodology.field_field_eu_gl_methodology_target_id = :node__field_field_eu_gl_methodology_field_field_eu_gl_methodology_target_id)) AND ((group_content_field_data_node_field_data.gid = :group_content_field_data_gid)) AND ((node_field_data.nid = :node_field_data_nid))) AND ((node_field_data.status = :db_condition_placeholder_4) AND (node_field_data.type IN (:db_condition_placeholder_5))) ORDER BY node_field_data_created DESC NULLS LAST LIMIT 1 OFFSET 0; Array ( [:node__field_field_eu_gl_methodology_field_field_eu_gl_methodology_target_id] => 6 [:group_content_field_data_gid] => structure [:node_field_data_nid] => view [:db_condition_placeholder_4] => 1 [:db_condition_placeholder_5] => gl_step [:views_join_condition_0] => study-group_node-gl_step [:views_join_condition_1] => 0 [:views_join_condition_3] => gl_step )

Replace autocomplete fields by drop-down Fields

Please replace all autocomplete fields by drop-down fields / lists when selecting existing terms from a taxonomy to give the user a chance to view the selectable options. E.g. consider the following example: It is not possible to choose an existing license for a Data Package if you don't know the name of the license.

grafik

Install/enable modules

I think we will need this modules:

  • Group
  • Form mode manager
  • view mode page
  • json api
  • json field
  • colorbox
  • colorbox load or
    • Colorbox field formatter
    • Field Group Colorb
  • REST
  • REST UI

Please use composer to install the modules since updating will be the easiest with composer (concerning dependencies ).

Warning: Usage of json_field bricks Drupal instance

Warning: Module json_field 8.x-1.0-rc1 doesn't seem to include the patch mentioned in this issue. Creating a filed of type native JSONB could therefore 'brick' the Drupal instance: The website encountered an unexpected error. Please try again later.

Error: Uncaught Error: Using $this when not in object context in /app/web/modules/contrib/json_field/json_field.views.inc:19

Trying to remove the field via the admin UI (/admin/group/types/manage/study/fields) is not possible due to the error mentioned above. If the json_field is already in use, drush pm:uninstall json_field will result in an error, too e.g. json_field: The <em class="placeholder">JSON (native binary storage)</em> field type is used in the following field: group.field_worldstates.

The command field-delete was removed in Drush 9.x! See also #29

General UI Improvements

Here we collect some important improvements to the user interface that need to be addressed for CSIS v1.

  • Landing Page
  • Remove admin controls for non-admin users
  • better separation between study and GL-step tabs
  • Progress Indicator
  • better separation between prototype implementation and mock-ups
  • Update Taxonomies
  • Open Taxonomies' description in popups or inline (Study type, sector)
  • remove links on Taxonomies in study ( country)

UndefinedLinkTemplateException

Accessing the group admin page ( /admin/group/) sometimes yields to an UndefinedLinkTemplateException:

Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'edit-form.area' found for the 'group' entity type in Drupal\Core\Entity\Entity->toUrl() (line 224 of /app/web/core/lib/Drupal/Core/Entity/Entity.php)

The error is probably related to this issue.

Install Drupal Modules

Helferlein, die nicht fehlen sollten:

  • "drush/drush" Drush Drupal shell commanline tool für Drupal erlaubt bearbeiten von Drupaleinstellungen über die shell und/oder
  • "drupal/console" Drupal Console ähnlich wie Drush kann auch Filestrukturen für module und ähnliches generieren
  • "drupal/admin_toolbar" Verbesserung des Admin Menues
  • "drupal/ctools" Set of APIs, wird hier und da von anderen Modulen benötigt
  • "drupal/devel" Development tools Debug ausgabe und ähnliches
  • "drupal/ds" Display suite Tools zur besseren Darstellung
  • "drupal/module_filter" Bessere Darstellung der installierten/verfügbaren Module
  • "drupal/pathauto" Pattern basierte automatische erstellung von url-aliases
  • "drupal/restui" Oberfläche für die Konfiguration der Rest schnittstelle
  • "drupal/field_group" erlaubt Gruppieren von Feldern in verschiedene Container (Tabs, Fieldsets, HTML-elemente)
  • "drupal/imce" Verbessertes Dateihandling

Möglicherweise benötigt

  • "drupal/features" erlaubt den Export und Import von Konfiguration von einer Drupal 8 Instanz zu einer anderen oder
  • "drupal/config_split" für die migration von config
  • "drupal/simplify" Ausblenden von Hilfe texten in der Oberfläche
  • "drupal/twig_tweak" Zusätzliche Funktionen für die Templates
  • "drupal/jsonapi" verbesserte json rest API

Für Clarity sicher oder mit sehr hoher Wahrscheinlichkeit benötigt

  • "drupal/conditional_fields" Felder abhängig von anderen Feldern anzeigen, und ausfüllen
  • "drupal/chosen" bessere darstellung von multi select Feldern
  • "drupal/ng_lightbox" content in Popup
  • "drupal/view_mode_page" verschiedene Anzeigen für eine Form (für Wizard)
  • "drupal/form_mode_manager" Pfade zu den verschiedenen view modes eines nodes (für wizard)
  • "drupal/geofield" Speichert geoinformationen
  • "drupal/inline_entity_form" anlegen und bearbeiten einer Entity (node,...) über ien refernece feld
  • "drupal/iframe" Iframe

Für Clarity vielleicht benötigt

  • "drupal/geofield_map" map componente für geofield (ein und ausgabe)
  • "drupal/group" Erlaubt die erstellung von Gruppen und content zugehörig zu gruppen (vermutlich sinnvoll für die Teams eines Scenarios)
  • "drupal/openlayersd8" Openlayers für Drupal 8

Module Filter and Admin Toolbar not working

The module filter and Admin Toolbar are not working. Maybe there is some confusion for drupal where to find files (I assume some js thing)

Since this will affect other modules as well we have to research and fix this.

Create private GitLab repository for drupal-data

Split this GitHub repository into docker configuration and csis configuration repositories: Move /drupal-data docker host-mounted volume to new private GitLab repository and include drush configuration, settings.php, etc., too.

Wrong Mimetypes

Drupal sets wrong MIME Type on automatically generated / processed CSS & JS files causing browsers like Firefox or Chrome to refuse loading such files:

Problem loading stylesheet - not loaded because its MIME type, "text/html", is not "text/css", "text/html", is not "text/javascript".

Temporary workaround: disable JS / CSS preprocessing as described here

drush -y config-set system.performance css.preprocess 0
drush -y config-set system.performance js.preprocess 0

Drupal Update to v8.6.x

Apply Drupal Security Update v8.5.6.
See Update core via Composer

# backup:
pascal@V3LS1809:/docker/999-duplicity$ docker-compose run duplicity
# update
pascal@V3LS1809:/docker/100-csis$ docker exec --user 1002 -it csis-drupal bash
pascal@e23b98b9fa41:/app$ composer outdated drupal/*
pascal@e23b98b9fa41:/app$ composer update drupal/core --with-dependencies
pascal@e23b98b9fa41:/app$ drush updatedb
pascal@e23b98b9fa41:/app$ drush cr
pascal@e23b98b9fa41:/app$ drush cex
pascal@e23b98b9fa41:/app$ exit
pascal@V3LS1809:/docker/100-csis$ git commit -a -m"...."
pascal@V3LS1809:/docker/100-csis$ git push

Cannot load GroupContent entities for an unsaved entity

Creating a new entity in a group, e.g. /group/1/content/create doesn't work anymore:
Drupal\Core\Entity\EntityStorageException: Cannot load GroupContent entities for an unsaved entity. in Drupal\group\Entity\Storage\GroupContentStorage->loadByEntity() (line 84 of /app/web/modules/contrib/group/src/Entity/Storage/GroupContentStorage.php).

See also issue #2966706.

@fgeyer16 @patrickkaleta
Any idea how to fix this?

Create Group type study

Each study will be a group: In this way we can easily maintain the team.
Fields for the moment:

  • acronym short name -> text
  • name -> text
  • study goal -> long text (without summary)
  • study mode -> Taxonomy reference
  • sector -> Taxonomy reference
  • country -> Taxonomy reference
  • area -> geo field

Setup Single-Sign-On

Setup CAS (Central Authentication Service) with CLARITY Marketplace, EMIKAT, GeoServer, etc.

Create Taxonomies

We need some Taxonomies:

  • country
    • beside the name this taxonomy should have a geofield so that we can store the boundaries of the country
  • Sector subsectors will be child terms of the sector term
  • maybe we should make the study mode a Taxonomy as well?

Data Package Views

Please update the Data Package Views (Data Tabs in Study, HC, EE, ....) so that they they properly show the contents of the Data Package.

grafik

Views should follow the Mock-Ups. E.g. in the Study View (https://csis.myclimateservice.eu/study/1/view/data) is is probably sufficient to show the general meta-data of the whole data package, possibly with the link to all actual Data Resources. In The Data Tabs of the Module Steps, only the relevant Data Resources (e.g. only Hazard Resources in Hazard Tab) should be shown (Example).

Mock-Up: Data Package Content for EE Step
_ hazard _ data hazard info _data2

UnknownExtensionException: The module standard does not exist.

Drupal\Core\Extension\Exception\UnknownExtensionException: The module standard does not exist. in Drupal\Core\Extension\ExtensionList->get() (line 257 of /app/web/core/lib/Drupal/Core/Extension/ExtensionList.php). when accessing `admin/modules´.

"Include in Report Button" for external Apps

As described in this issue, we have to extend ReactMount and iFrame Content Types by an "Include in report" button that uses html2canvas to create a screenshot of the whole embedded app (e.g. map component with all layers as shown on the screen, table component or scenario-analysis component) and stores it in the GL-Step.

We could either add html2canvas.min.js to csis.libraries.yml in csis-theme and add a <button> + the respective REST calls to the Drupal API directly in an HTML field. Or we integrate the functionality (JS function) in the csis-helpers-module.

In any case, the "Include in Report Button" needs to be parametrised with the following contextual information:

  • id of the html element that should be 'snap-shotted' by html2canvas
  • target node and field where the snapshot (HTML Canvas serialised as image/png) should be stored (via JSON/REST API)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.