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

set generate automatic URL alias programmatically

With pathauto enabled, how can we programmatically set “Generate automatic URL alias” to TRUE for existing nodes, using PHP or SQL?

I have tried all patches and PHP or SQL solutions suggested and nothing has worked for the latest D8 + pathauto releases.

After having studied various options, I believe this could be the fastest way to do it:

Drupal 8 hook_form_alter

Dear everyone,

I've been struggling for almost a week now trying to learn how to implement hook_form_alter in Drupal 8. I've got the Form API module from the examples module and I've been trying to insert hook_form_alter there but Drupal doesn't even see this function.

The routing file looks like this:

Register your new entity

hi guys,

please help me how to do to upadate the new entity in my bd.

i use drush entup but nothing

please help me !!!!

Content entity type

hi guys,

i want to explore the ContentEntityType. but when i finish to it. i have some error . the mapping of error is :
Doctrine\Common\Annotations\AnnotationException: [Syntax Error] Expected PlainValue, got ''' at position 66 in class Drupal\mymodule\Entity\Message. in Doctrine\Common\Annotations\AnnotationException::syntaxError() (line 42 of vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationException.php).

when i go to look the line 66 in entity class Message , i have this:

'weight' => -5,

Node validation

i'm developing hospital management product.
Blood Management is there which is having blood status contains blood group and blood quantity.
While giving blood to patient i need to refer blood status table & quantity should be less than or equal.

i want throw error back if quantity is more than available blood .
How can i implement this.?

How to test installed configuration entities?

I receive error messages, when I want to test a custom module, which uses configuration entities. The problem finds place, when during installation of the tested module, the yaml files in config/install/ folder are processed.

Pages

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