missing fields bug fix

This commit is contained in:
Bachir Soussi Chiadmi 2024-11-05 10:19:31 +01:00
parent cab86fcb11
commit e6271c6624
7 changed files with 59 additions and 83 deletions

View File

@ -11,6 +11,7 @@ dependencies:
- field.field.node.site.field_nom_de_la_commune_nb_d_hab - field.field.node.site.field_nom_de_la_commune_nb_d_hab
- field.field.node.site.field_nom_du_qpv_nb_d_hab - field.field.node.site.field_nom_du_qpv_nb_d_hab
- field.field.node.site.field_parties - field.field.node.site.field_parties
- field.field.node.site.field_poid
- field.field.node.site.field_porteur_s_de_site - field.field.node.site.field_porteur_s_de_site
- field.field.node.site.field_programme_de_l_etat - field.field.node.site.field_programme_de_l_etat
- field.field.node.site.field_region - field.field.node.site.field_region
@ -47,12 +48,10 @@ third_party_settings:
width_breakpoint: 640 width_breakpoint: 640
group_infos: group_infos:
children: children:
- field_numero
- field_region - field_region
- field_nom_du_qpv_nb_d_hab - field_nom_du_qpv_nb_d_hab
- field_departement_s - field_departement_s
- field_programme_de_l_etat - field_programme_de_l_etat
- field_collectivite_s_epci
- field_porteur_s_de_site - field_porteur_s_de_site
- field_nom_de_la_commune_nb_d_hab - field_nom_de_la_commune_nb_d_hab
label: Infos label: Infos
@ -87,6 +86,7 @@ third_party_settings:
group_details: group_details:
children: children:
- status - status
- field_poid
- created - created
- uid - uid
- simple_sitemap - simple_sitemap
@ -105,8 +105,7 @@ third_party_settings:
required_fields: true required_fields: true
weight: -1 weight: -1
group_mots_clefs: group_mots_clefs:
children: children: { }
- field_mots_clefs
label: 'Mots Clefs' label: 'Mots Clefs'
region: content region: content
parent_name: group_tabs parent_name: group_tabs
@ -296,6 +295,13 @@ content:
convert: '0' convert: '0'
duplicate: duplicate duplicate: duplicate
third_party_settings: { } third_party_settings: { }
field_poid:
type: number
weight: 3
region: content
settings:
placeholder: ''
third_party_settings: { }
field_porteur_s_de_site: field_porteur_s_de_site:
type: string_textarea type: string_textarea
weight: 18 weight: 18

View File

@ -11,6 +11,7 @@ dependencies:
- field.field.node.site.field_nom_de_la_commune_nb_d_hab - field.field.node.site.field_nom_de_la_commune_nb_d_hab
- field.field.node.site.field_nom_du_qpv_nb_d_hab - field.field.node.site.field_nom_du_qpv_nb_d_hab
- field.field.node.site.field_parties - field.field.node.site.field_parties
- field.field.node.site.field_poid
- field.field.node.site.field_porteur_s_de_site - field.field.node.site.field_porteur_s_de_site
- field.field.node.site.field_programme_de_l_etat - field.field.node.site.field_programme_de_l_etat
- field.field.node.site.field_region - field.field.node.site.field_region
@ -35,7 +36,7 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 106 weight: 5
region: content region: content
field_documents: field_documents:
type: file_default type: file_default
@ -43,7 +44,7 @@ content:
settings: settings:
use_description_as_link_text: true use_description_as_link_text: true
third_party_settings: { } third_party_settings: { }
weight: 111 weight: 9
region: content region: content
field_geofield: field_geofield:
type: geofield_default type: geofield_default
@ -52,7 +53,7 @@ content:
output_format: wkt output_format: wkt
output_escape: true output_escape: true
third_party_settings: { } third_party_settings: { }
weight: 115 weight: 13
region: content region: content
field_images: field_images:
type: image_caption type: image_caption
@ -63,7 +64,7 @@ content:
image_loading: image_loading:
attribute: lazy attribute: lazy
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 1
region: content region: content
field_liens_site: field_liens_site:
type: link type: link
@ -75,7 +76,7 @@ content:
rel: '' rel: ''
target: '' target: ''
third_party_settings: { } third_party_settings: { }
weight: 112 weight: 10
region: content region: content
field_nom_de_la_commune_nb_d_hab: field_nom_de_la_commune_nb_d_hab:
type: string type: string
@ -83,7 +84,7 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 110 weight: 8
region: content region: content
field_nom_du_qpv_nb_d_hab: field_nom_du_qpv_nb_d_hab:
type: string type: string
@ -91,7 +92,7 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 105 weight: 4
region: content region: content
field_parties: field_parties:
type: entity_reference_revisions_entity_view type: entity_reference_revisions_entity_view
@ -100,14 +101,14 @@ content:
view_mode: default view_mode: default
link: '' link: ''
third_party_settings: { } third_party_settings: { }
weight: 113 weight: 11
region: content region: content
field_porteur_s_de_site: field_porteur_s_de_site:
type: basic_string type: basic_string
label: above label: above
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
weight: 109 weight: 7
region: content region: content
field_programme_de_l_etat: field_programme_de_l_etat:
type: string type: string
@ -115,7 +116,7 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 107 weight: 6
region: content region: content
field_region: field_region:
type: string type: string
@ -123,7 +124,7 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 104 weight: 3
region: content region: content
field_sous_titre: field_sous_titre:
type: string type: string
@ -131,12 +132,12 @@ content:
settings: settings:
link_to_entity: false link_to_entity: false
third_party_settings: { } third_party_settings: { }
weight: 114 weight: 12
region: content region: content
links: links:
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
weight: 100 weight: 2
region: content region: content
title: title:
type: title type: title
@ -145,10 +146,11 @@ content:
link_to_entity: true link_to_entity: true
tag: h2 tag: h2
third_party_settings: { } third_party_settings: { }
weight: -49 weight: 0
region: content region: content
hidden: hidden:
created: true created: true
field_poid: true
langcode: true langcode: true
search_api_excerpt: true search_api_excerpt: true
uid: true uid: true

View File

@ -12,6 +12,7 @@ dependencies:
- field.field.node.site.field_nom_de_la_commune_nb_d_hab - field.field.node.site.field_nom_de_la_commune_nb_d_hab
- field.field.node.site.field_nom_du_qpv_nb_d_hab - field.field.node.site.field_nom_du_qpv_nb_d_hab
- field.field.node.site.field_parties - field.field.node.site.field_parties
- field.field.node.site.field_poid
- field.field.node.site.field_porteur_s_de_site - field.field.node.site.field_porteur_s_de_site
- field.field.node.site.field_programme_de_l_etat - field.field.node.site.field_programme_de_l_etat
- field.field.node.site.field_region - field.field.node.site.field_region
@ -60,6 +61,7 @@ hidden:
field_nom_de_la_commune_nb_d_hab: true field_nom_de_la_commune_nb_d_hab: true
field_nom_du_qpv_nb_d_hab: true field_nom_du_qpv_nb_d_hab: true
field_parties: true field_parties: true
field_poid: true
field_porteur_s_de_site: true field_porteur_s_de_site: true
field_programme_de_l_etat: true field_programme_de_l_etat: true
field_region: true field_region: true

View File

@ -12,6 +12,7 @@ dependencies:
- field.field.node.site.field_nom_de_la_commune_nb_d_hab - field.field.node.site.field_nom_de_la_commune_nb_d_hab
- field.field.node.site.field_nom_du_qpv_nb_d_hab - field.field.node.site.field_nom_du_qpv_nb_d_hab
- field.field.node.site.field_parties - field.field.node.site.field_parties
- field.field.node.site.field_poid
- field.field.node.site.field_porteur_s_de_site - field.field.node.site.field_porteur_s_de_site
- field.field.node.site.field_programme_de_l_etat - field.field.node.site.field_programme_de_l_etat
- field.field.node.site.field_region - field.field.node.site.field_region
@ -62,6 +63,7 @@ hidden:
field_nom_de_la_commune_nb_d_hab: true field_nom_de_la_commune_nb_d_hab: true
field_nom_du_qpv_nb_d_hab: true field_nom_du_qpv_nb_d_hab: true
field_parties: true field_parties: true
field_poid: true
field_porteur_s_de_site: true field_porteur_s_de_site: true
field_programme_de_l_etat: true field_programme_de_l_etat: true
field_region: true field_region: true

View File

@ -0,0 +1,25 @@
uuid: a074192e-6a9a-4e1c-8726-27497c07ce78
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_poid
- node.type.site
id: node.site.field_poid
field_name: field_poid
entity_type: node
bundle: site
label: Poid
description: ''
required: false
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
min: -20
max: 20
prefix: ''
suffix: ''
field_type: integer

View File

@ -4,13 +4,11 @@ status: true
dependencies: dependencies:
config: config:
- page_manager.page.node_view - page_manager.page.node_view
- views.view.site
module: module:
- ctools_block - ctools_block
- node - node
- panels - panels
- q2d_mod - q2d_mod
- views
id: node_view-panels_variant-0 id: node_view-panels_variant-0
label: Sites label: Sites
weight: 0 weight: 0
@ -63,28 +61,6 @@ variant_settings:
- '' - ''
html_id: '' html_id: ''
css_styles: '' css_styles: ''
4f39a2a9-9180-481e-ac4a-168fcc5fd8e4:
id: 'entity_field:node:field_numero'
label: Numéro
label_display: '0'
provider: ctools_block
context_mapping:
entity: node
formatter:
type: number_integer
weight: 0
label: visually_hidden
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
region: second
weight: -3
uuid: 4f39a2a9-9180-481e-ac4a-168fcc5fd8e4
css_classes:
- ''
html_id: ''
css_styles: ''
0f521934-a0b6-49c7-9dd0-b984c8d80ef3: 0f521934-a0b6-49c7-9dd0-b984c8d80ef3:
id: 'entity_field:node:field_documents' id: 'entity_field:node:field_documents'
label: Documents label: Documents
@ -152,43 +128,6 @@ variant_settings:
- '' - ''
html_id: '' html_id: ''
css_styles: '' css_styles: ''
06132319-e1c4-45e4-9b9e-2db00c2d5ea2:
id: 'views_block:site-block_1'
label: ''
label_display: '0'
provider: views
context_mapping: { }
views_label: ''
items_per_page: none
exposed: { }
region: second
weight: 0
uuid: 06132319-e1c4-45e4-9b9e-2db00c2d5ea2
css_classes:
- ''
html_id: ''
css_styles: ''
6e59adf8-c9fe-438c-9518-413fa8f77ffb:
id: 'entity_field:node:field_mots_clefs'
label: 'Mots Clefs'
label_display: visible
provider: ctools_block
context_mapping:
entity: node
formatter:
type: entity_reference_label
weight: 0
label: visually_hidden
settings:
link: false
third_party_settings: { }
region: second
weight: 1
uuid: 6e59adf8-c9fe-438c-9518-413fa8f77ffb
css_classes:
- ''
html_id: ''
css_styles: ''
585c2156-c9db-4940-8382-0744350facf6: 585c2156-c9db-4940-8382-0744350facf6:
id: prevnextsite_block id: prevnextsite_block
label: 'PrevNext Site Block' label: 'PrevNext Site Block'

View File

@ -27,15 +27,15 @@ class PrevNextSite extends BlockBase {
if ($node) { if ($node) {
$nodetype = $node->getType(); $nodetype = $node->getType();
if($nodetype === "site"){ if($nodetype === "site"){
$num = $node->get('field_numero')->getString(); $num = $node->get('field_poid')->getString();
$allSites = \Drupal::entityTypeManager()->getStorage('node') $allSites = \Drupal::entityTypeManager()->getStorage('node')
->loadByProperties(['type' => 'site', 'status' => 1]); ->loadByProperties(['type' => 'site', 'status' => 1]);
usort($allSites, function($a, $b){ usort($allSites, function($a, $b){
$numA = $a->get('field_numero')->getString(); $numA = $a->get('field_poid')->getString();
$numB = $b->get('field_numero')->getString(); $numB = $b->get('field_poid')->getString();
if ($numA == $numB) { if ($numA == $numB) {
return 0; return 0;
} }
@ -44,7 +44,7 @@ class PrevNextSite extends BlockBase {
$prevnode = null; $prevnode = null;
$nextnode = null; $nextnode = null;
foreach($allSites as $index => $site){ foreach($allSites as $index => $site){
$n = $site->get('field_numero')->getString(); $n = $site->get('field_poid')->getString();
if($n === $num){ if($n === $num){
$prevnode = $index - 1 >= 0 ? $allSites[$index - 1] : null; $prevnode = $index - 1 >= 0 ? $allSites[$index - 1] : null;
$nextnode = $index + 1 < count($allSites) ? $allSites[$index + 1] : null; $nextnode = $index + 1 < count($allSites) ? $allSites[$index + 1] : null;