- 🇮🇳India ravimalviya2000
Hi,
On below issues some discussion done for node saving by programming.
issues : https://www.drupal.org/project/pathauto/issues/1462080 →There triggered alias parameter when node save.
I have a node content type with a pattern like this:
[node:field_ref_term:entity:field_text_url_path]/[node:field_text_url_path]
When I save a node manually, the URL alias is updated correctly.
When I import nodes with Feeds, the URL alias is updated correctly.
When I delete all aliases and use bulk regenerate to make more, the URL alias is updated correctly.
However, when I save a node programmatically like this:
$node = Node::load($nid);
$node->setChangedTime(\Drupal::time()->getRequestTime());
$node->save();
Then the pathauto alias is "[node:field_ref_term:entity:field_text_url_path]-number", as there are several nodes with the same term reference, and the number is used to distinguish them.
1. Create a content type with a taxonomy term reference.
2. Add a text field to the content type, "field_text_url_path".
3. Add a text field to the taxonomy vocabulary, "field_text_url_path".
4. Try saving a node of the content type with $node->save()
as described above.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hi,
On below issues some discussion done for node saving by programming.
issues :
https://www.drupal.org/project/pathauto/issues/1462080 →
There triggered alias parameter when node save.