Browse Source

upgraded all cutom modules, themes & profile following upgrade-status

bach 6 months ago
parent
commit
ee271ab4d8

+ 1 - 0
web/modules/custom/materio_expo/src/Controller/QRController.php

@@ -41,6 +41,7 @@ class QRController extends ControllerBase {
       $query = $entity_storage->getQuery()
         ->condition('type', 'materiau')
         ->condition('status', '1')
+        ->accessCheck()
         ->condition('field_reference', $ref);
       $results = $query->execute();
       $nid = array_pop($results);

+ 1 - 0
web/modules/custom/materio_home/materio_home.module

@@ -193,6 +193,7 @@ function materio_home_cron(){
     // Short-running operation example, not using a queue
     $query = \Drupal::entityQuery('node')
       ->condition('status', 1)
+      ->accessCheck(FALSE)
       ->condition('type', 'frontpage');
     $nids = $query->execute();
     $nodes = entity_load_multiple('node', $nids);

+ 2 - 1
web/modules/custom/materio_home/src/Controller/AjaxHomeController.php

@@ -78,7 +78,8 @@ class AjaxHomeController extends ControllerBase {
     $view_builder = $this->entityTypeManager()->getViewBuilder('node');
     $renderable = $view_builder->view($node, 'home_full');
     $rendered = $this->renderer->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      // return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data['rendered'] = $rendered;

+ 1 - 0
web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedArticlesReferences.php

@@ -41,6 +41,7 @@ class ComputedArticlesReferences extends EntityReferenceFieldItemList
         ->sort('created', 'DESC')
         ->exists('field_visuel')
         ->range(0,12)
+        ->accessCheck()
         ->condition('type', 'article');
     $nids = $query->execute();
     $i = 0;

+ 1 - 0
web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedMaterialsReferences.php

@@ -45,6 +45,7 @@ class ComputedMaterialsReferences extends EntityReferenceFieldItemList
       ->condition('field_materiau_images.%delta', 3, '>')
       ->exists('field_materiau_images')
       ->sort('created', 'DESC')
+      ->accessCheck()
       ->range(0,200);
     $results = $query->execute();
     if ($results) {

+ 1 - 0
web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedShowroomsReferences.php

@@ -39,6 +39,7 @@ class ComputedShowroomsReferences extends EntityReferenceFieldItemList
   protected function computeValue() {
     $query = \Drupal::entityQuery('taxonomy_term')
         ->condition('status', 1)
+        ->accessCheck(FALSE)
         ->condition('vid', 'showroom');
         // remove masqué
 

+ 1 - 0
web/modules/custom/materio_id/materio_id.module

@@ -22,6 +22,7 @@ function computed_field_field_index_compute($entity_type_manager, $entity, $fiel
     ->condition('type', $entity->bundle())
     ->condition('field_famille', $famille)
     ->sort('field_index', 'DESC')
+    ->accessCheck(FALSE)
     ->range(0,1);
 
   $nids = $query->execute();

+ 1 - 0
web/modules/custom/materio_samples/src/Plugin/Field/FieldWidget/SamplesDefaultWidget.php

@@ -31,6 +31,7 @@ class SamplesDefaultWidget extends WidgetBase {
     $query = \Drupal::entityQuery('taxonomy_term')
         ->sort('weight', 'DESC')
         // ->sort('tid', 'DESC')
+        ->accessCheck()
         ->condition('vid', $vid);
     $tids = $query->execute();
     $terms = Term::loadMultiple($tids);

+ 2 - 1
web/modules/custom/materio_sapi/src/Controller/AjaxSearchForm.php

@@ -58,7 +58,8 @@ class AjaxSearchForm extends ControllerBase {
     
     $this->getFormDefinition();
 
-    $rendered = render($this->form_builded);
+    // $rendered = render($this->form_builded);
+    $rendered = \Drupal::service('renderer')->render($this->form_builded);
     // $form_builded = $this->form_builded;
     // $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($form_builded) {
     //     return render($form_builded);

+ 1 - 0
web/modules/custom/materio_sapi/src/Form/MaterioSapiSearchForm.php

@@ -84,6 +84,7 @@ class MaterioSapiSearchForm extends FormBase {
     // ]
     $query = \Drupal::entityQuery('taxonomy_term');
     $query->condition('vid', "assisted_research")
+          ->accessCheck(TRUE)
           ->sort('field_weight', 'ASC');
     $tids = $query->execute();
     $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids);

+ 1 - 1
web/modules/custom/materio_simplenews/materio_simplenews.module

@@ -31,7 +31,7 @@ function materio_simplenews_form_node_simplenews_issue_form_alter(&$form, &$form
 }
 
 function materio_simplenews_getSimplenewsNodeBodyTemplate($news_id){
-  return file_get_contents(drupal_get_path('module', 'materio_simplenews').'/templates/simplenews_'.$news_id.'_node.html');
+  return file_get_contents(\Drupal::service('extension.list.module')->getPath('materio_simplenews').'/templates/simplenews_'.$news_id.'_node.html');
 }
 
 function materio_simplenews_form_node_simplenews_issue_edit_form_alter(&$form, &$form_state, $form_id) {

+ 2 - 1
web/modules/custom/materio_user/src/Controller/AjaxLoginForm.php

@@ -55,7 +55,8 @@ class AjaxLoginForm extends ControllerBase {
 
     $this->getFormDefinition();
 
-    $rendered = render($this->form_builded);
+    // $rendered = render($this->form_builded);
+    $rendered = \Drupal::service('renderer')->render($this->form_builded);
     // $form_builded = $this->form_builded;
     // $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($form_builded) {
     //     return render($form_builded);

+ 2 - 1
web/modules/custom/materio_user/src/Controller/AjaxRegisterForm.php

@@ -62,7 +62,8 @@ class AjaxRegisterForm extends ControllerBase {
 
     $this->getFormDefinition();
 
-    $rendered = render($this->form_builded);
+    // $rendered = render($this->form_builded);
+    $rendered = \Drupal::service('renderer')->render($this->form_builded);
     // $form_builded = $this->form_builded;
     // $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($form_builded) {
     //     return render($form_builded);

+ 1 - 1
web/modules/custom/vue_link_formatter/src/Plugin/Field/FieldFormatter/VueImageFormatter.php

@@ -80,7 +80,7 @@ class VueImageFormatter extends ImageFormatter {
         // context to ensure different file URLs are generated for different
         // sites in a multisite setup, including HTTP and HTTPS versions of the
         // same site. Fix in https://www.drupal.org/node/2646744.
-        $url = Url::fromUri(file_create_url($image_uri));
+        $url = Url::fromUri(\Drupal::service('file_url_generator')->generateAbsoluteString($image_uri));
         $cache_contexts[] = 'url.site';
       }
       $cache_tags = Cache::mergeTags($base_cache_tags, $file->getCacheTags());

+ 1 - 1
web/profiles/d8-starterkit-profile

@@ -1 +1 @@
-Subproject commit 3a8a1dac5e52deb8f4059f7ae8af7d5d993d1d84
+Subproject commit ac69727be76c5956d90003ea4fcc95dd26f83b7d

+ 1 - 1
web/themes/custom/materiotheme/materiotheme.info.yml

@@ -2,7 +2,7 @@ name: Materio
 description: 'Materio Drupal 8 theme with gulp'
 type: theme
 base theme: classy
-core_version_requirement: ^8.8 || ^9.2
+core_version_requirement: ^8.8 || ^9.2 || ^10
 libraries:
   - core/normalize
   - materiotheme/global-css

+ 1 - 1
web/themes/custom/matminimal/matminimal.info.yml

@@ -1,7 +1,7 @@
 name: Matminimal
 type: theme
 description: 'Adminimal based drupal administration theme with material design.'
-core_version_requirement: ^8.8 || ^9.2
+core_version_requirement: ^8.8 || ^9.2 || ^10
 base theme: adminimal_theme
 
 libraries: