Skip to content
Snippets Groups Projects
Commit 9c04618d authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3347004: Fix Drupal 10 Error message on installation - Entity queries...

Issue #3347004: Fix Drupal 10 Error message on installation - Entity queries must explicitly set whether the query should be access checked or not
parent f105c91e
No related branches found
No related tags found
No related merge requests found
......@@ -416,13 +416,14 @@ class ConfigBit implements EventSubscriberInterface, ContainerInjectionInterface
* The name of the config.
*
* @return bool
* The status of cofnig.
* The status of config.
*/
protected function configExists(string $config_name) {
$query = $this->database->select('config', 'c');
$query->condition('c.name', $config_name, '=');
$query->addExpression('COUNT(*)', 'count');
$query->condition('c.name', $config_name, '=')
->accessCheck(FALSE)
->addExpression('COUNT(*)', 'count');
$config_count = $query->execute()->fetchField();
......@@ -464,7 +465,7 @@ class ConfigBit implements EventSubscriberInterface, ContainerInjectionInterface
// containing all the values from [target config expected to have]
// that are not present in [target config data].
// ----------------------------------------------------------------------.
// Wild card exption to have in all listed configs.
// Wild card exception to have in all listed configs.
if (isset($config_action['expected_config_wild_card'])) {
$wild_card_configs = $this->configFactory->listAll($config_action['expected_config_wild_card']);
foreach ($wild_card_configs as $wild_card_name) {
......@@ -510,7 +511,7 @@ class ConfigBit implements EventSubscriberInterface, ContainerInjectionInterface
// containing all the values from [target config expected NOT to
// have] that are not present in [target config data] .
// ----------------------------------------------------------------------.
// Wild card exption not to have in all listed configs.
// Wild card exception not to have in all listed configs.
if (isset($config_action['expected_config_wild_card'])) {
$wild_card_configs = $this->configFactory->listAll($config_action['expected_config_wild_card']);
foreach ($wild_card_configs as $wild_card_name) {
......
......@@ -9,7 +9,7 @@ use Vardot\Entity\EntityDefinitionUpdateManager;
*
* Customized class from the Devel Entity Updates module
* Development version of the entity definition update manager.
* Swhiched to EntityDefinitionUpdateManager
* Switched to EntityDefinitionUpdateManager
* https://github.com/Vardot/entity-definition-update-manager.
*/
final class VarbaseEntityDefinitionUpdateManager extends EntityDefinitionUpdateManager {
......
......@@ -77,7 +77,7 @@ class AssemblerForm extends FormBase {
* {@inheritdoc}
*
* @return array
* Extra compoments modules.
* Extra components modules.
*/
public function buildForm(array $form, FormStateInterface $form_state, array &$install_state = NULL) {
$form['#title'] = $this->t('Extra components');
......
......@@ -13,7 +13,7 @@ use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
/**
* Defines form for selecting Varbase's Multiligual configuration options form.
* Defines form for selecting Varbase's Multilingual configuration options form.
*/
class ConfigureMultilingualForm extends FormBase implements ContainerInjectionInterface {
......
......@@ -10,7 +10,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\varbase\Config\ConfigBit;
/**
* Defines form for selecting extra compoennts for the assembler to install.
* Defines form for selecting extra components for the assembler to install.
*/
class DevelopmentToolsAssemblerForm extends FormBase {
......@@ -122,7 +122,7 @@ class DevelopmentToolsAssemblerForm extends FormBase {
'#default_value' => $checkbox_selected,
];
// If config_form is ture for this development tool.
// If config_form is true for this development tool.
if (isset($development_tool_info['config_form']) &&
$development_tool_info['config_form'] == TRUE) {
$form['development_tools'][$development_tool_key . '_config'] = [
......
......@@ -53,7 +53,7 @@ function varbase_auth_build_formbit(array &$formbit, FormStateInterface &$form_s
* To update the editable config in drupal active config.
*
* @param array $editable_config_values
* Editable cofnig values.
* Editable config values.
*/
function varbase_auth_submit_formbit(array $editable_config_values) {
$auth_modules = $editable_config_values['varbase_auth']['social_auth_type'];
......
......@@ -78,7 +78,7 @@ function varbase_development_build_formbit(array &$formbit, FormStateInterface &
* To update the editable config in drupal active config.
*
* @param array $editable_config_values
* Editable cofnig values.
* Editable config values.
*/
function varbase_development_submit_formbit(array $editable_config_values) {
// Save the changed values for system.logging config.
......
......@@ -531,7 +531,10 @@ function varbase_reset_timestamp_for_default_content($reset) {
if ($reset) {
// Reset timestamp for all file's default content.
$file_storage = \Drupal::service('entity_type.manager')->getStorage('file');
$file_ids = $file_storage->getQuery()->accessCheck(FALSE)->execute();
$file_ids = $file_storage->getQuery()
->accessCheck(FALSE)
->execute();
if (isset($file_ids)
&& is_array($file_ids)
&& count($file_ids) > 0) {
......@@ -547,7 +550,10 @@ function varbase_reset_timestamp_for_default_content($reset) {
// Reset timestamp for all Media's default content.
$media_storage = \Drupal::service('entity_type.manager')->getStorage('media');
$media_ids = $media_storage->getQuery()->accessCheck(FALSE)->execute();
$media_ids = $media_storage->getQuery()
->accessCheck(FALSE)
->execute();
if (isset($media_ids)
&& is_array($media_ids)
&& count($media_ids) > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment