This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

managed file not allowing to replace a file

Hello.

I'm under D7, trying to build up a form with several file upload fields. I declared a new Streamwrapper.

Input format "PHP code" for Drupal 9?

Hi!

I need to embedded a php code in my web made with Drupal 9  because I need to migrate a database (that use a query with php code) made in Drupal 6 to my new web. I see that in the old web I can choose an input format "php code" for this page in order to embedded the php code, by using the PHP filter module. How could I do for Drupal 9? I was searching a module but I couldn't find anything.

Thanks in advance!

Autocomplete field

I'm experimenting with how to customize an auto-complete field.
Filter the nodes in bae to various parameters
The code is this
  $storage = \Drupal::entityTypeManager()->getStorage('node');
    $qry = $storage->getQuery()
      ->condition( 'type', 'anagrafica_richiedenti' )
      ->condition('status', 1)
      ->condition('field_attivo', 1)
      ->sort( 'title', 'ASC' )
    ->execute();

Accessing additional external database

I have some functionality that relies on me connecting to an external db (read only), and I have configured it in my settings.php as such;

$databases['atavism']['default'] = array (
'database' => 'world',
'username' => 'redacted',
'password' => 'redacted',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);

I then have this in my controller:

Add facabook-domain-verification metatag in home page

How do I add the below metatag to the <head> section in the html of the domain page/home page of the website.

<meta name="facebook-domain-verification" content="xyz" />

Urgent help required

Drupal merge query failed to get the entity id

I am trying to merge some of the node detail to custom table because of project requirement. Whatever I try, the below code is unable to fetch the entity-id();  and entity field value. 

Please rectify where I am doing mistake. 

//filename stackrecom09.module

<?php

use Drupal\Core\Entity;

/**
* Implements hook_node_update().
*/

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions