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

Creation of a new custom form

I have created a custom form and it works.
I need to create another module by clicking on install this error returns me and I don't know what to do to solve the problem. I tried to delete and reinstall it but nothing to do

ReflectionException: Class \Drupal\hello\HelloController does not exist in ReflectionMethod->__construct() (line 136 of core\lib\Drupal\Core\Entity\EntityResolverManager.php).

External script using Drupal database and user module

Hi all,

I'm working on an external script using user database and rights management from Drupal 7. It was working fine till some update on the server (unfortunately I'm not able to get exact info about updates from the provider, or maybe it is casused by some change in Drupal I dont remeber). 

At the beginning of the srcipt I'm loading drupal core using this:

How do I add column to existing table on module installation?

I am trying to add a new column to a table and I added the column using hook_update_N() in the module.install file:

Composer patch submodules

Hello all,

I am trying to patch a submodule: jsonapi_defaults installed with jsonapi_extras (modules/jsonapi_extras/jsonapi_defaults) using composer on Drupal 8.9.10.

I tried the following:

    "extra": {
         "patches": {
        "drupal/jsonapi_extras" : {
        "Configurable JSON:API Max Limit": "https://www.drupal.org/files/issues/2020-08-09/max-page-limit-configurable_2884292_17.patch"
         }
        },

But was not able to apply patch to the submodule.

Thanks in advance.

Create entity if not existe using feeds

I use feeds to import data from csv file with eck entity processor and feeds module drupal 7, in fields of bundel i have entity reference field named nom candidat like in image bellow, but when i import data from csv file i need to create if note existe a new entity candidat in candidat entity type. In this case i have setup used feed entity reference and maping field "nom candidat" to according entity id, but when i upload to file it doesn't create candidat entity if not existe, how i can do that please 

Nested taxonomy checkboxes in custom form

Hello,

In my custom form I'am trying to get values from a nested taxonomy checkboxes field.

$form['test'] = [
'#type' => 'checkboxes',
'#title' => t('title'),
0 => array(
'#type' => 'checkboxes',
'#options' => array('1' => 'one'),
0 => array(
'#type' => 'checkboxes',
'#options' => array('2' => 'two'),
),
),
1 => array('#type' => 'checkboxes',
'#options' => array('3' => 'three'),
),
];

Pages

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