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

This commit is contained in:
Bachir Soussi Chiadmi 2024-08-20 19:47:47 +02:00
parent 38501ecf4d
commit ee271ab4d8
17 changed files with 21 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,7 +31,7 @@ function materio_simplenews_form_node_simplenews_issue_form_alter(&$form, &$form
} }
function materio_simplenews_getSimplenewsNodeBodyTemplate($news_id){ 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) { function materio_simplenews_form_node_simplenews_issue_edit_form_alter(&$form, &$form_state, $form_id) {

View File

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

View File

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

View File

@ -80,7 +80,7 @@ class VueImageFormatter extends ImageFormatter {
// context to ensure different file URLs are generated for different // context to ensure different file URLs are generated for different
// sites in a multisite setup, including HTTP and HTTPS versions of the // sites in a multisite setup, including HTTP and HTTPS versions of the
// same site. Fix in https://www.drupal.org/node/2646744. // 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_contexts[] = 'url.site';
} }
$cache_tags = Cache::mergeTags($base_cache_tags, $file->getCacheTags()); $cache_tags = Cache::mergeTags($base_cache_tags, $file->getCacheTags());

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

View File

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

View File

@ -1,7 +1,7 @@
name: Matminimal name: Matminimal
type: theme type: theme
description: 'Adminimal based drupal administration theme with material design.' 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 base theme: adminimal_theme
libraries: libraries: