Drupal Answers Community Digest

Top new questions this week:

Field formatter with twig editor in settings form

I've created Drupal 9 module with custom field formatter for many field types (string, entity_reference, image etc). I'm trying to implement twig editor in the formatter to control output. I need to ...

8 nodes  
user avatar asked by Nikita Melnik Score of 2

Replacement for hook_user_presave() for saving values captured in the user form to the user profile

I am porting a module from Drupal 7 to Drupal 9. The code uses hook_user_presave() to save two fields on the fly into the user profile data. /** * Implements hook_user_presave(). */ function ...

forms users hooks 9  
user avatar asked by Binny Score of 1
user avatar answered by apaderno Score of 3

How do I recreate Ubercart's product attributes?

While rebuilding an old D7 site with Ubercart into a new D9/Commerce installation, among other problems, I stumbled upon this one. In Ubercart I can add as many product attributes as I want and make ...

commerce 9  
user avatar asked by ytsejam Score of 1

Greatest hits from previous weeks:

Drush command not found after Drush completely installed

I installed Drush 8 with composer. composer require drush/drush:~8 Unfortunately, error drush command not found after Drush completely installed. Why's the drush command can't be use? Installing ...

user avatar asked by JJ12345 Score of 14
user avatar answered by greg_1_anderson Score of 25

How can I import the configuration on a different site?

I have this error when I try to import the config of an another site: The staged configuration cannot be imported, because it originates from a different site than this site. You can only ...

8 configuration  
user avatar asked by Axel Briche Score of 69
user avatar answered by MrUpsidown Score of 16

Manually disable a module

In Drupal 7, I could manually edit the {system} table in the database to disable a stubbon module. In my Drupal 8 site, this table is gone. How can I manually disable a module in Drupal 8?

user avatar asked by bumpaw Score of 53
user avatar answered by Jigarius Score of 60

Getting the image URL from a field_image on a node

So I have this Node: object(Drupal\node\Entity\Node)[1862] protected 'values' => array (size=17) 'vid' => array (size=1) 'x-default' => string '7' (length=1) ...

8 media  
user avatar asked by Rias Score of 52
user avatar answered by itsdarrylnorris Score of 65

Nginx vs Apache - Are there any actual usage comparisons and statistcs out there?

I have a new server to play with, and I am staring at a blank canvas. I can put anything I want on it. While I am comfortable with Apache, I keep hearing how nginx can handle so much more traffic than ...

user avatar asked by blue928 Score of 49
user avatar answered by Letharion Score of 61

How can I get the path alias from a node ID or node object?

I have a node object, and I am trying to use it to get a given path in Drupal 8. There was drupal_lookup_path() in Drupal 7 but I'm not seeing any equivalent or documentation for Drupal 8. What's ...

8 nodes path-aliases  
user avatar asked by Jack Ryan Score of 40
user avatar answered by 4uk4 Score of 77

How can I change the page title?

In Drupal 7, I could change the page title with drupal_set_title(t('New page title')). When I try it in Drupal 8, I get a There is no such function error. How can I change the page title?

user avatar asked by Jeff Madison Score of 34
user avatar answered by Yuseferi Score of 42
You're receiving this message because you subscribed to the Drupal Answers community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038