theming – Too many CSS files with drupal 9

I installed drupal with the web interface and using the default Bartik 9.1.6 theme. The html source showing too many stylesheet included in the header as well as near to the footer.
How can I remove unsuded css and js files?

In header

<title>Home | My Site</title>
    <link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/normalize-css/normalize.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/misc/normalize-fixes.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/align.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/fieldgroup.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/container-inline.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/clearfix.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/details.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/hidden.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/item-list.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/js.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/nowrap.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/position-container.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/progress.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/reset-appearance.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/resize.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/sticky-header.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/tablesort.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/system/css/components/tree-child.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/ajax-progress.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/autocomplete-loading.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tabledrag.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/contextual/css/contextual.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/jquery.ui/themes/base/core.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/jquery.ui/themes/base/resizable.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/jquery.ui/themes/base/checkboxradio.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/jquery.ui/themes/base/controlgroup.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/assets/vendor/jquery.ui/themes/base/button.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/quickedit/css/quickedit.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/views/css/views.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/toolbar.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/modules/contrib/devel/css/devel.toolbar.css?qrongn" />
<link rel="stylesheet" media="screen" href="/drupal/core/modules/tour/css/tour.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/contextual/css/contextual.toolbar.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/state/toolbar.menu.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/contextual/css/contextual.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/contextual/css/contextual.icons.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/quickedit/css/quickedit.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/quickedit/css/quickedit.icons.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/seven/css/components/quickedit.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/shortcut/css/shortcut.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/shortcut/css/shortcut.icons.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/theme/toolbar.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/theme/toolbar.icons.theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/modules/user/css/user.icons.admin.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/modules/contrib/admin_toolbar/admin_toolbar_tools/css/tools.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/modules/contrib/admin_toolbar/css/admin.toolbar.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/base/elements.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/base/typography.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/base/print.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/layout/system-admin--layout.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/layout/breadcrumb.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/layout/local-actions.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/layout/layout.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-admin--admin-list.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-admin--links.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-admin--modules.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-admin--panel.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-admin--status-report.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/node.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/jquery.ui/theme.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/progress.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/layout/card-list.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/card.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/container-inline.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/exposed-filters.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/field.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/icons.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/inline-form.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/item-list.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/link.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/links.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/menu.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/more-link.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/tablesort.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/textarea.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/classy/components/ui-dialog.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/accordion.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/action-link.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/content-header.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/container-inline.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/container-inline.module.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/breadcrumb.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/button.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/details.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/divider.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/messages.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/entity-meta.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/fieldset.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--checkbox-radio.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--checkbox-radio--ie.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--field-multiple.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--managed-file.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--text.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/form--select.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/help.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/image-preview.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/menus-and-lists.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/modules-page.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/node.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/page-title.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/pager.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/skip-link.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tables.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/table--file-multiple-widget.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/search-admin-settings.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tablesort-indicator.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-status-report.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-status-report-general-info.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tableselect.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-status-report-counters.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/system-status-counter.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tabs.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/views-ui.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/views-exposed-form.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/dialog.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/theme/colors.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/shortcut.css?qrongn" />
<link rel="stylesheet" media="all" href="/drupal/core/themes/claro/css/components/tour.theme.css?qrongn" />

    <script src="/drupal/core/assets/vendor/modernizr/modernizr.min.js?v=3.8.0"></script>
<script src="/drupal/core/misc/modernizr-additional-tests.js?v=3.8.0"></script>

And near to the footer

</div>

    
    
  <script type="application/json" data-drupal-selector="drupal-settings-json">{"path":{"baseUrl":"/drupal/","scriptPath":null,"pathPrefix":"","currentPath":"node","currentPathIsAdmin":false,"isFront":true,"currentLanguage":"en"},"pluralDelimiter":"u0003","suppressDeprecationErrors":true,"ajaxPageState":{"libraries":"admin_toolbar/toolbar.tree,admin_toolbar_tools/toolbar.icon,big_pipe/big_pipe,claro/classy.node,claro/global-styling,contextual/drupal.contextual-links,contextual/drupal.contextual-toolbar,core/drupal.active-link,core/drupal.message,core/normalize,devel/devel-toolbar,quickedit/quickedit,shortcut/drupal.shortcut,system/base,toolbar/toolbar,toolbar/toolbar.escapeAdmin,tour/tour,user/drupal.user.icons,views/views.module","theme":"claro","theme_token":null},"ajaxTrustedUrl":(),"bigPipePlaceholderIds":{"callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessagesu0026args%5B0%5Du0026token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA":true,"callback=Drupal%5Cdevel%5CToolbarHandler%3AlazyBuilderu0026u0026token=aWxkb66rXy701UgPJu0fWo_EZYjKGt5PNmbtKiiJmks":true,"callback=user.toolbar_link_builder%3ArenderToolbarLinksu0026u0026token=xssKdKFVFD7N0FUPPcC1C7LrqMHpQFVzUhrI4cOeEgs":true,"callback=user.toolbar_link_builder%3ArenderDisplayNameu0026u0026token=-MH2NzEnTzbzMk0ZGfGgoiw7G3j_-Q1ILWBRVhIOKLI":true,"callback=shortcut.lazy_builders%3AlazyLinksu0026u0026token=N1997Wch59v-LxHku3-dD44wjkSNmhegNzlZ8jS0L5I":true},"toolbar":{"breakpoints":{"toolbar.narrow":"only screen and (min-width: 16.5em)","toolbar.standard":"only screen and (min-width: 38.125em)","toolbar.wide":"only screen and (min-width: 61em)"},"subtreesHash":"vBP4ESm31g1nvKqoba4Mw1IIIIA0EEO7IHtD4rNXHMc"},"user":{"uid":"1","permissionsHash":"b042cce329752869b093cc9c48aa4c26eed4c3b5df70661980405395c0f53a2a"}}</script>
<script src="/drupal/core/assets/vendor/jquery/jquery.min.js?v=3.5.1"></script>
<script src="/drupal/core/assets/vendor/underscore/underscore-min.js?v=1.11.0"></script>
<script src="/drupal/core/misc/polyfills/array.find.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/es6-promise/es6-promise.auto.min.js?v=4.2.8"></script>
<script src="/drupal/core/misc/polyfills/object.assign.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/jquery-once/jquery.once.min.js?v=2.2.3"></script>
<script src="/drupal/core/assets/vendor/backbone/backbone-min.js?v=1.4.0"></script>
<script src="/drupal/core/misc/drupalSettingsLoader.js?v=9.1.6"></script>
<script src="/drupal/core/misc/drupal.js?v=9.1.6"></script>
<script src="/drupal/core/misc/drupal.init.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/data-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/disable-selection-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/form-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/labels-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/jquery-1-7-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/scroll-parent-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/tabbable-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/unique-id-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/version-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/escape-selector-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/focusable-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/keycode-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/plugin-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/safe-active-element-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/safe-blur-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widget-min.js?v=1.12.1"></script>
<script src="/drupal/core/modules/contextual/js/contextual.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/models/StateModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/views/AuralView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/views/KeyboardView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/views/RegionView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/views/VisualView.js?v=9.1.6"></script>
<script src="/drupal/core/misc/progress.js?v=9.1.6"></script>
<script src="/drupal/core/misc/ajax.js?v=9.1.6"></script>
<script src="/drupal/core/themes/claro/js/ajax.js?qrongn"></script>
<script src="/drupal/core/assets/vendor/jquery-form/jquery.form.min.js?v=4.22"></script>
<script src="/drupal/core/misc/debounce.js?v=9.1.6"></script>
<script src="/drupal/core/misc/displace.js?v=9.1.6"></script>
<script src="/drupal/core/misc/form.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/mouse-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/ie-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/draggable-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/position-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/resizable-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/form-reset-mixin-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/controlgroup-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/button-min.js?v=1.12.1"></script>
<script src="/drupal/core/assets/vendor/jquery.ui/ui/widgets/dialog-min.js?v=1.12.1"></script>
<script src="/drupal/core/misc/dialog/dialog.js?v=9.1.6"></script>
<script src="/drupal/core/misc/dialog/dialog.position.js?v=9.1.6"></script>
<script src="/drupal/core/misc/dialog/dialog.jquery-ui.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/popperjs/popper.min.js?v=2.5.4"></script>
<script src="/drupal/core/modules/quickedit/js/quickedit.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/util.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/models/BaseModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/models/AppModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/models/EntityModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/models/FieldModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/models/EditorModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/AppView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/FieldDecorationView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/EntityDecorationView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/EntityToolbarView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/ContextualLinkView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/FieldToolbarView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/views/EditorView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/quickedit/js/theme.js?v=9.1.6"></script>
<script src="/drupal/core/misc/announce.js?v=9.1.6"></script>
<script src="/drupal/core/misc/message.js?v=9.1.6"></script>
<script src="/drupal/core/themes/claro/js/messages.js?qrongn"></script>
<script src="/drupal/core/misc/active-link.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/toolbar.menu.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/toolbar.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/models/MenuModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/models/ToolbarModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/views/BodyVisualView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/views/MenuVisualView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/views/ToolbarAuralView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/toolbar/js/views/ToolbarVisualView.js?v=9.1.6"></script>
<script src="/drupal/core/assets/vendor/jquery-joyride/jquery.joyride-2.1.js?v=2.1.0.1"></script>
<script src="/drupal/core/modules/tour/js/tour.js?v=9.1.6"></script>
<script src="/drupal/core/misc/tabbingmanager.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/contextual.toolbar.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/toolbar/models/StateModel.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/toolbar/views/AuralView.js?v=9.1.6"></script>
<script src="/drupal/core/modules/contextual/js/toolbar/views/VisualView.js?v=9.1.6"></script>
<script src="/drupal/modules/contrib/admin_toolbar/js/jquery.hoverIntent.js?qrongn"></script>
<script src="/drupal/modules/contrib/admin_toolbar/js/admin_toolbar.js?qrongn"></script>
<script src="/drupal/core/modules/toolbar/js/escapeAdmin.js?v=9.1.6"></script>
<script src="/drupal/core/modules/big_pipe/js/big_pipe.js?v=9.1.6"></script>

<script type="application/vnd.drupal-ajax" data-big-pipe-event="start"></script>
    <script type="application/vnd.drupal-ajax" data-big-pipe-replacement-for-placeholder-with-id="callback=shortcut.lazy_builders%3AlazyLinks&amp;&amp;token=N1997Wch59v-LxHku3-dD44wjkSNmhegNzlZ8jS0L5I">
    ({"command":"insert","method":"replaceWith","selector":"(data-big-pipe-placeholder-id=u0022callback=shortcut.lazy_builders%3AlazyLinksu0026u0026token=N1997Wch59v-LxHku3-dD44wjkSNmhegNzlZ8jS0L5Iu0022)","data":"u003Cul class=u0022toolbar-menuu0022u003Eu003Cliu003Eu003Ca href=u0022/drupal/node/addu0022u003EAdd contentu003C/au003Eu003C/liu003Eu003Cliu003Eu003Ca href=u0022/drupal/admin/contentu0022u003EAll contentu003C/au003Eu003C/liu003Eu003C/ulu003Eu003Ca href=u0022/drupal/admin/config/user-interface/shortcut/manage/default/customizeu0022 class=u0022edit-shortcutsu0022u003EEdit shortcutsu003C/au003E","settings":null})
    </script>    <script type="application/vnd.drupal-ajax" data-big-pipe-replacement-for-placeholder-with-id="callback=user.toolbar_link_builder%3ArenderDisplayName&amp;&amp;token=-MH2NzEnTzbzMk0ZGfGgoiw7G3j_-Q1ILWBRVhIOKLI">
    ({"command":"insert","method":"replaceWith","selector":"(data-big-pipe-placeholder-id=u0022callback=user.toolbar_link_builder%3ArenderDisplayNameu0026u0026token=-MH2NzEnTzbzMk0ZGfGgoiw7G3j_-Q1ILWBRVhIOKLIu0022)","data":"cvniras","settings":null})
    </script>    <script type="application/vnd.drupal-ajax" data-big-pipe-replacement-for-placeholder-with-id="callback=user.toolbar_link_builder%3ArenderToolbarLinks&amp;&amp;token=xssKdKFVFD7N0FUPPcC1C7LrqMHpQFVzUhrI4cOeEgs">
    ({"command":"insert","method":"replaceWith","selector":"(data-big-pipe-placeholder-id=u0022callback=user.toolbar_link_builder%3ArenderToolbarLinksu0026u0026token=xssKdKFVFD7N0FUPPcC1C7LrqMHpQFVzUhrI4cOeEgsu0022)","data":"u003Cul class=u0022toolbar-menuu0022u003Eu003Cli class=u0022accountu0022u003Eu003Ca href=u0022/drupal/useru0022 title=u0022User accountu0022u003EView profileu003C/au003Eu003C/liu003Eu003Cli class=u0022account-editu0022u003Eu003Ca href=u0022/drupal/user/1/editu0022 title=u0022Edit user accountu0022u003EEdit profileu003C/au003Eu003C/liu003Eu003Cli class=u0022logoutu0022u003Eu003Ca href=u0022/drupal/user/logoutu0022u003ELog outu003C/au003Eu003C/liu003Eu003C/ulu003E","settings":null})
    </script>    <script type="application/vnd.drupal-ajax" data-big-pipe-replacement-for-placeholder-with-id="callback=Drupal%5Cdevel%5CToolbarHandler%3AlazyBuilder&amp;&amp;token=aWxkb66rXy701UgPJu0fWo_EZYjKGt5PNmbtKiiJmks">
    ({"command":"insert","method":"replaceWith","selector":"(data-big-pipe-placeholder-id=u0022callback=Drupal%5Cdevel%5CToolbarHandler%3AlazyBuilderu0026u0026token=aWxkb66rXy701UgPJu0fWo_EZYjKGt5PNmbtKiiJmksu0022)","data":"n              u003Cul class=u0022toolbar-menu claro-toolbar-menuu0022u003En                    u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/cache/clear?destination=/drupal/nodeu0026amp;token=syd9Fa6b7q9b7RD4bmOEEfKXoLtsL674mgYxCM5KHuwu0022 data-drupal-link-query=u0022{u0026quot;destinationu0026quot;:u0026quot;\/drupal\/nodeu0026quot;}u0022 data-drupal-link-system-path=u0022devel/cache/clearu0022u003ECache clearu003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/configu0022 title=u0022Edit configuration.u0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-system-path=u0022devel/configu0022u003EConfig editoru003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/container/serviceu0022 data-drupal-link-system-path=u0022devel/container/serviceu0022u003EContainer Infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/routes/item?path=/nodeu0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-query=u0022{u0026quot;pathu0026quot;:u0026quot;\/nodeu0026quot;}u0022 data-drupal-link-system-path=u0022devel/routes/itemu0022u003ECurrent route infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/admin/config/development/develu0022 title=u0022Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the block administration page.u0022 data-drupal-link-system-path=u0022admin/config/development/develu0022u003EDevel settingsu003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/elementsu0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-system-path=u0022devel/elementsu0022u003EElement Infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/entity/infou0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-system-path=u0022devel/entity/infou0022u003EEntity Infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/eventsu0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-system-path=u0022devel/eventsu0022u003EEvents Infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003En        u003Ca href=u0022/drupal/devel/field/infou0022 class=u0022toolbar-horizontal-item-hiddenu0022 data-drupal-link-system-path=u0022devel/field/infou0022u003EField Infou003C/au003En              u003C/liu003En                u003Cli class=u0022menu-itemu0022u003E

upgrading – The “twig” service or alias has been removed or inlined when the container was compiled. Upgrade Drupal 8.9.13 to 9.0.11

I’m trying to upgrade Drupal 8.9.13 to 9.0.11 in my local setup (Windows & xampp). I have upgraded all the contributed modules which supports for Drupal 9. When I try to upgrade core, got below error.

The website encountered an unexpected error. Please try again later.
SymfonyComponentDependencyInjectionExceptionServiceNotFoundException: The “twig” service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead. in SymfonyComponentDependencyInjectionContainer->make() (line 275 of vendorsymfonydependency-injectionContainer.php).

After google got something similar then tried to upgrade 9.2 then also faced same same issue.
https://www.drupal.org/project/drupal/issues/3161889

hook_form_alter for a Webform – Drupal Answers

I have another post here:

Retrieve Webform submission data from database

I got some guidance but some of it wasn’t feasible for our application and the edited assistance was a bit general. Based on the person’s suggestions I am trying to use a hook_form_alter on a Webform module webform. Here’s the files and code I have.

cc_processing_getsubmissiondata.info.yml

name: 'CC Processing Get SubmissionData'
description: 'Provides a custom webform handler for retrieving the previous forms submission data'
core_version_requirement: ^8.8
Core: 8.x
package: Custom
type: module

CCProcessingGetSubmissionData.module

<?php

/**
 * Implementation of hook_form_alter
 */
 use DrupalCoreFormFormStateInterface;
 
 function CCProcessingGetSubmissionData_webform_submission_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
    echo "form alter hook triggered";
    
    if($form('#webform_id') == 'credit_card_billing_information') {
        echo "form alter form id found";
        $myValue = 'Jared';
        $form('elements')('credit_card_name')('#default_value') = $myValue;
    }
 }

I am not new to programming but am new to Drupal programming. I have some other code in the module that’s not in the answer suggestion on my previous post like the echos I found on other posts in an attempt to try to get something to happen that lets me know the the hook is being called. Both files are in modules/custom/cc_processing_getsubmissiondata. The folder structure I got off of a YouTube video on building hooks but it was just a short 8 minute basic hook video. From all the posts I’ve seen out there, everything I have looks correct but nothing happens. Any assistance in helping me getting this hook to work would be awesome. 🙂

http request – Redirect non-www to www in settings.php for Drupal 8

I want to redirect all non-www to www in below function.

if ( (!array_key_exists('HTTPS', $_SERVER)) && (PHP_SAPI !== 'cli') ) {
  if (substr($_SERVER('HTTP_HOST'), 0, 4) <> 'www.') {
    $new_url = 'www.' . $_SERVER('HTTP_HOST');
  } else {
    $new_url = $_SERVER('HTTP_HOST');
  }
  $new_url .= $_SERVER('REQUEST_URI');

  header('HTTP/1.1 301 Moved Permanently');
  header('Location: https://'. $new_url);
  exit();
}

Webform Custom element option values validate – Drupal 8

Can anyone please suggest how to validate the custom element option values ( select). This validate should work, once we add new element to the form and fill the option value and then click save / save and add element.

entities – Autofill drupal field in edit page

I am not sure if this was posted earlier, but I would be specific and conscise.

I am writing a Drupal module to store post meta in the “Node edit” page field. Just basic field, in node edit page.

What I am Looking for
Upon inserting the title of the node, I have multivalued field(3 values to take), the first one gets automatically populated with the title of the page.

And when I have set the url of the node, the field (2nd) value also gets populated… and like so.

How to implement the above? With Javascript if possible, that would be more native. Or Drupal Jquery API.

Use for the above Module I am building plain meta field for my website.

I can build Module, and know about JavaScript, JQuery, but I do not know how to put all together to make the above.

How to add help text icon (i) next to Custom form element label in Drupal 8?

I’m trying to add info icon next to custom form label. For example When user hover on the info icon, it will display the description of the label. please help!
I know there is
‘#attributes’ => array ( ‘title’ => t(“text description”),), which will show help text when hover on text area. But in my case, it needs to be added to the icon next to field label.

Drupal 9: Custom Block disapears after page reload

I have created a custom block with a custom module (Example: https://www.webwash.net/programmatically-create-block-drupal-8/). The goal is to display some external content, which is working. The only issue is if i reload the frontend page where this block is loaded, it disapears. I have to flush caches to bring it back. Does anybody know the reason? Thanks for helping!

Function for loading the external url:

class LebenslagenGeburt extends BlockBase {
  /**
   * {@inheritdoc}
   */
   public function build() {
                                
        return array(
        '#markup' => $this->_populate_markup(),
        );
    }   
                
    private function _populate_markup() {
        function getter($url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        $data = curl_exec($ch);
        curl_close($ch);
        return $data;
    }

echo getter('https://www.muster.at/.syndication?pageShortcut=L-GB&format=html');
                    
    }   

views – how to use entity_access() and entity_load fuction in Drupal 9

function sun_gated_content_entity_view_mode_alter(&$view_mode, $context) {
  // All the content types which could be gated.
  $types = array( 'document', 'media', 'gallery' );

  $entity =& $context('entity');
  if ($context('entity_type') == 'node') {
    // Check if this could be a gated content type.
    if (in_array($entity->type, $types)) {
      // Check if it is gated.
      if (_sun_gated_content_is_gated($entity)) {
        // @todo: Make sure that the HTTP header Cache-Control: no-cache works with Varnish. Can also try drupal_set_header with max-age=0.
        // Prevent Drupal caching the page.
        $GLOBALS('conf')('cache') = FALSE;

        // Load the form gate webform node..
        $form = entity_load('node', array(
          $entity->field_form_gate(Language::LANGCODE_NOT_SPECIFIED)(0)('target_id')
        ));

and

$entity->field_form_gate(Language::LANGCODE_NOT_SPECIFIED)(0)('entity') = current($form);
          $entity->field_form_gate(Language::LANGCODE_NOT_SPECIFIED)(0)('access') = entity_access('view','node',$entity);

in my custom module in d7 i used this lines of code , but in d9 modules entity_access() and entity_load function are not working ,how to used it , can anyone help me with it .

8 – How to create an archive containing files with the Drupal interface?

When you reserve a domain name with a host, it offers a free space of 10 MB to publish a web page (this type of offer does not support PHP).

I created a small 8MB website with HTML, CSS and JS (it’s also a PWA). It is really very simple. Here it is :

https://github.com/S1BIOSE/E-business-Card

I want to create in Drupal 8, a small website generator for my clients. The little website I created should serve as a model.

I want to take the files from my small website and modify them on the fly using a form.

Here’s the idea :
A user completes a form with his information (name of the company, description of the company, postal address, pages on social networks, …), he clicks on a button “Generate the website”. Drupal replaces the information in the files and generates an archive.

That’s all.

This generator must be built with a Bootstrap 4 formula. It must not save anything in the database and generate the files on the fly.

Is it possible to create such a program with Drupal 8 ?

Thank you