Drush 10, Drupal 9, views-bulk-operations:execute using entity:delete_action:node seems to work but won’t save its changes

I’m trying a command:
drush -vvv views-bulk-operations:execute -d deleteme_content entity:delete_action:node

where deleteme_content is a View with translations of entities that I want to delete. The command appears to work and prints a success message but the content is not actually deleted.

I’ve traced all the way into drupal/core/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php where I added some temporary logging messages and see in executeMultiple() that the desired entities are being changed in $this->tempStore.

So it looks to me like the changes are being made in tempStore but then not being “committed” to the permanent storage. I have looked for a “commit” type option in both drush and the vbo-execute command for drush and don’t see anything.

Can anyone provide a clue?

Understanding Js & Css aggregation in Drupal 8

I am taking an HTML snapshot of a node in Drupal 8 every day at 4 am. Every night a Cron job kicks off this process. I have a service that handles the entire process.
Everything works for now, but I am worried that the referenced CSS and js files will break due to file name changing due to the aggregation process. My question is that how does Drupal 8 change/hash the file names, and how can I reliably point the references to the right file names.

e.g. test.css—>css_buR8WZD_p6Ruv7vm5dxhluxu6EZrcWus.css

As you can see in the example above, the test.css is hashed to css_buR8WZD_p6Ruv7vm5dxhluxu6EZrcWus.css

How to convert full site in html static file in Drupal 8? or Is there any API for Drupal 8?

I have tried Static Generator Module but that also doesn’t convert the full site in html page. Also i have tried Tome module giving issue while creating user as below error.

The website encountered an unexpected error. Please try again later.

DrupalCoreEntityEntityStorageException: Failed to create config directory ../content in DrupalCoreEntitySqlSqlContentEntityStorage->save() (line 846 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
DrupalCoreConfigFileStorage->write() (Line: 143)
Drupaltome_syncExporter->exportContent() (Line: 19)
call_user_func_array() (Line: 403)
DrupalCoreExtensionModuleHandler->invokeAll() (Line: 206)
DrupalCoreEntityEntityStorageBase->invokeHook() (Line: 843)
DrupalCoreEntityContentEntityStorageBase->invokeHook() (Line: 535)
DrupalCoreEntityEntityStorageBase->doPostSave() (Line: 728)
DrupalCoreEntityContentEntityStorageBase->doPostSave() (Line: 460)
DrupalCoreEntityEntityStorageBase->save() (Line: 837)
DrupalCoreEntitySqlSqlContentEntityStorage->save() (Line: 395)
DrupalCoreEntityEntityBase->save() (Line: 101)
call_user_func_array() (Line: 114)
DrupalCoreFormFormSubmitter->executeSubmitHandlers() (Line: 52)
DrupalCoreFormFormSubmitter->doSubmitForm() (Line: 593)
DrupalCoreFormFormBuilder->processForm() (Line: 321)
DrupalCoreFormFormBuilder->buildForm() (Line: 91)
call_user_func_array() (Line: 123)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->DrupalCoreEventSubscriber{closure}() (Line: 573)
DrupalCoreRenderRenderer->executeInRenderContext() (Line: 124)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->DrupalCoreEventSubscriber{closure}() (Line: 151)
SymfonyComponentHttpKernelHttpKernel->handleRaw() (Line: 68)
SymfonyComponentHttpKernelHttpKernel->handle() (Line: 57)
DrupalCoreStackMiddlewareSession->handle() (Line: 47)
DrupalCoreStackMiddlewareKernelPreHandle->handle() (Line: 106)
Drupalpage_cacheStackMiddlewarePageCache->pass() (Line: 85)
Drupalpage_cacheStackMiddlewarePageCache->handle() (Line: 47)
DrupalCoreStackMiddlewareReverseProxyMiddleware->handle() (Line: 52)
DrupalCoreStackMiddlewareNegotiationMiddleware->handle() (Line: 23)
StackStackedHttpKernel->handle() (Line: 708)
DrupalCoreDrupalKernel->handle() (Line: 19)

input formats – Cannot enable PHP Filter module in a fresh Drupal 7 installation

In order to test my ISP (a2hosting.com), I created a simple website running Drupal version 7.74 (the latest from the 7 branch) on a subdomain. It is a standard installation, with no additional modules nor themes.

Then I tried to enable the PHP filter module. When clicking Save configuration, the admin/modules page reloads without giving any message and without enabling the module, which remains off. I can turn other modules on and off as expected, but not the PHP filter. Other features are apparently OK.

What could be the problem?

The website is this. I can provide the Admin password if someone wants to check it.

PS. I did this test after having problems with PHP code on my sites, as described here. A2’s support team was unable to help.

drush – Drupal root not found. Pass –root or a @siteAlias in order to see Drupal-specific commands

I have multiple sites inside the same htdocs directory. In one, I removed all the folders except vendor under Web. Now drush will not work (it worked before I moved the folders). But now, it cannot find the database, which is correctly defined in web/sites/default/settings.php

/srv/www/htdocs/jar/drupal # ./drush status
 PHP binary    : /usr/bin/php
 PHP config    : /srv/www/php.ini
 PHP OS        : Linux
 Drush script  : /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush
 Drush version : 10.3.6
 Drush temp    : /tmp
 Drush configs : /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.yml
 Drupal root   : /srv/www/htdocs/jar/drupal

I am running Drupal 9.0.8 and drush 10.3.6 (in /srv/www/htdocs/jar/drupal). I have removed drush using composer (2.0.3) and reinstalled it (recreating vendor in the process).

/srv/www/htdocs/jar/drupal # ./drush -vvv cr
 (preflight) Config paths: /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.yml
 (preflight) Alias paths: /srv/www/htdocs/jar/drupal/drush/sites,/srv/www/htdocs/jar/drush/sites
 (preflight) Commandfile search paths: /srv/www/htdocs/jar/drupal/vendor/drush/drush/src
 (debug) Starting bootstrap to site (0.04 sec, 8.17 MB)

In BootstrapHook.php line 32:
  Bootstrap failed. Run your command with -vvv for more information.
Exception trace:
  at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Boot/BootstrapHook.php:32
 DrushBootBootstrapHook->initialize() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->doInitializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->callInitializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->initialize() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 ConsolidationAnnotatedCommandCommandProcessor->initializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:296
 ConsolidationAnnotatedCommandAnnotatedCommand->initialize() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Command/Command.php:221
 SymfonyComponentConsoleCommandCommand->run() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:1018
 SymfonyComponentConsoleApplication->doRunCommand() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:271
 SymfonyComponentConsoleApplication->doRun() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:147
 SymfonyComponentConsoleApplication->run() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Runtime/Runtime.php:118
 DrushRuntimeRuntime->doRun() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Runtime/Runtime.php:49
 DrushRuntimeRuntime->run() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.php:72
 require() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush:4

I looked at all the above suggestions, but am stuck. Drush works perfectly on my other 5 sites…

media – Video Player module for Drupal 8.*

Problem 1)
I want a Video player for drupal that has all the options that are available on Youtube player but I want it to play my local videos. Using the Media module (Drupal 8.9.5) gives me very few options in the video player.

Problem 2)
I want the video player to be overlayed on the entire page with the click of a button.

Any help would be appreciated. Thank you!

How do I access user fields inside a Drupal 8 twig template?

I have added a field_name_last field to the person/user entity.

How do I access it in the template?

I can use:


for such basic info, but would like to access the additional fields which have been added through the back end.

Drush 8.4.5 not updating Drupal core to 7.74 but indicating success

On a website running Drupal 7.73 I run drush up and get:

Project drupal was updated successfully. Installed version is now 7.74.
Backups were saved into the directory [ok]

I immediately clear all caches and run drush status to get:

Drupal version : 7.73

If I log in to the site and use the Status Report it also shows Drupal 7.73.
If I rerun drush up, it sees the need for an update and repeats the update with a ‘success’ message but the update doesn’t actually happen.


Drupal 7 Commerce Add to Cart button allows for multiple clicks – how do I stop this from happening?

This issue appears to be specific to recent versions of Google Chrome (both PC and Mac) and Safari on Mac and Edge on PC.

You can see the issue here: https://bookstores.umn.edu

Multiple clicks on the Add to Cart button will add more products to the cart (using latest versions of Chrome, Safari and Edge). Firefox appears to be OK.

i18n l10n – Multilingual in the drupal 7 problem

I am using drupal 7 to do my project. I want to use dual language to convert my webpage language. May I know how to convert the full page language? For example, the menu tab and someplace cannot convert the language, I just can convert the language like below picture got translate tab:
output 1

Below, for example, red bracket, I cannot make the translation, because of no translate tab:


My language switch tab in the below: