Create Article image


Having a brain freeze. When you create an article and click on image choose file it only give me option to upload an image not to be able to use a URL.

Is there an option to had that option ?

How can I use REST API through external php code?

I enabled all the restful services and rest api such that postman REST API requests work including "post" rest/node/article. However when I type up this code, I get an error 400: bad request and the drupal error logs claim that the error is because rest/node/article doesn't exist despite it working before. Please help.

use Drupal\Core\DrupalKernel;
use Drupal\Core\Site\Settings;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;

How can I update node's url path automatically?

I am using following code which is updating my node title fine but not URL PATH SETTING value.

// Update node.
$node_update = Node::load($node->id());
$node_update->title->value = 'My modified title';
$node_update->path->value = ['alias' => '/en/my-new-link'];

Entity reference and embed view

Can someone explain to me what function it has entity reference and embed view? I' using Drupal 8.
Thanks for the help.

How to specify EntityReference in EntityForm wrapper

Working on a custom module, new to drupal. Using this method:

to submit an EntityForm from an external app through a drupal module. Saving the form triggers a rule. One of the form fields is an entity reference, the Entity object is used by the rule. How can I programatically populate this field prior to saving the form? Thanks in advance.


Subscribe with RSS Subscribe to RSS - Drupal 8.x