Hot answers tagged

5

Provide a controller to download the PDF as discussed in the comments: https://stefvanlooveren.me/blog/serve-pdf-download-controller-drupal-8 <?php namespace Drupal\MYMODULE\Controller; use Drupal\Core\Controller\ControllerBase; use Symfony\Component\HttpFoundation\BinaryFileResponse; /** * Class PdfGeneratorController. */ class ...


5

Thanks to @leymannx composer update drupal/core drupal/core-dev --with-dependencies did it


4

Then don't use custom block types because they are stored in content entities. Use blocks storing only configuration. You can build a custom block plugin, even with a body field. See Custom block build function to display wysiwyg body text There are also some contrib options like Simple Block which is implementing a config entity for blocks.


2

As described in Support for automatic entity updates has been removed, when a module needs to update its own entity, and the update must change the database schema, the module needs to implement hook_post_update_NAME(). That is what the Taxonomy module does in taxonomy_post_update_make_taxonomy_term_revisionable() to make its entity revisionable. The key ...


2

Just an addition for windows users. lesley n. answer above works just fine for Windows users as well. Just edit C:\Users\your_username\.bash_profile and add one line: alias drush='vendor/bin/drush' Restart your Git Bash, go to your drupal site home folder and try: drush version It should work I was able to make composer-installed Drupal Console to work ...


1

Seems hook_node_access is not longer called for the create operation. Use hook_ENTITY_TYPE_create_access instead. See hook_node_access() no longer fires for the 'create' operation for background info and code samples on how to change your code. Also arg() is deprecated.


1

Looking at your prohibits output, drupal/sms is blocking the update: requires drupal/core (>=8.6 <8.9) You can try switching to smsframework.


1

I tried to do the same in D7 a while ago and I discovered a JS only solution is not possible. You need to add an ajax command to the Drupal callback. Here's a similar question to yours. This one is about the upload button and you want the remove button. In D7, the upload and remove button were handled by the same function and when I look at the D8 class of ...


1

The libraries folder is no longer managed by Drupal. The project Libraries doing this jobs in older Drupal versions seems to be deprecated in favor of a composer based concept. Modules still using the libraries folder use their own logic and you have to follow their instructions on the project page or README.


Only top voted, non community-wiki answers of a minimum length are eligible