Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes

The node ID for newly created nodes is fetched but the node is not loaded

Removing array_keys solved the problem
Xanthous's user avatar
  • 101
0 votes

Install module with required config that may exist

config/optional These are configuration items that depend on something that the extension itself does not explicitly depend on, so they are only installed if all their dependencies are met. https://...
Rod Namoc's user avatar
1 vote

How to import older database into newer configuration of site?

The correct command is ddev import-db. See Database Management for details.
mona lisa's user avatar
  • 5,951
0 votes

Change the Pay button text

This should work, function mymodule_form_commerce_checkout_flow_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { if ($form['#step_id'] === 'review') { $form['...
Chike's user avatar
  • 25
0 votes

Can't seem to find a way to have & in a term description show up as &

So this was a killer. CKEditor escapes the &. Then the field is provided by Views and renders in plain text escaped, rather than becoming unescaped when viewing it (so x & y on the final ...
JAyenGreen's user avatar
3 votes

Can't seem to find a way to have & in a term description show up as &

Ampersand is a special character, representing the start of an HTML entity. CKEditor is correct to convert your plain-text ampersands into the valid entity equivalent of &. If it didn’t do ...
Clive's user avatar
  • 167k
0 votes

Can create directories but can't upload files

It seems it is bug/feature at least in PHP 8.1.27 in move_uploaded_file() resp. is_uploaded_file() which is used in in Drupal 9.5 code: public function moveUploadedFile($filename, $uri) { ...
TMa's user avatar
  • 101
1 vote

Proper way to get input field value with AJAX

So, you can provide not raw and validated way – Otto Matik The proper & safe way is to get them using $form_state->getValue('field_name') $field_source_values = $form_state->getValue('...
No Sssweat's user avatar
  • 31.3k
0 votes

$group->addContent() in hook_node_insert() doesn't update the access permissions for the node

This was annoying because you can't use feeds once they're not added correctly. However, I managed to do it by setting a default value of "community" for the group, exporting the ...
Drupal ᐬrts's user avatar

Top 50 recent answers are included