

Given the other problems I’m having with D8 at the moment, I think I will leave Rules alone for now.
#Drupal rules code
So while on a case-by-case basis this can be fixed with some coding knowledge, I am also not happy with the idea that we need to insert custom code in the first place… this doesn’t feel very sustainable and if, as you say, Rules is THAT unstable, I am uneasy with using its interface to do something. While in principle, it would be nice to have something which works, I actually have quite a few sites which use Rules, so I would need custom code for all of them.

Anyway… that’s a general rant I have about D8, not something directed anyone specifically
#Drupal rules how to
I am also rather concerned at the direction Drupal is heading generally - it was presented as a “building websites without needing to know how to code”, but it increasingly looks like ‘knowing how to code’ is becoming a prerequisite for D8 (which causes me a lot of problems as I am not a programmer and have no coding knowledge). Thanks for the news about Rules - it is rather disappointing that such an important module is no longer sustained, or indeed has anything to replace it.
#Drupal rules free
Now it’s (or something) and I cannot find anything online which explains what’s what.Ĭan anyone help explain the D8 version of Rules, and what data selectors are supposed to go where with what syntax? Free coffee for a week if you can help me Moreover the data selectors have changed in D8. for ), not sure what I’m looking for in the drop-down lists, and as for trying to work out the data selector for “if X field is selected then…” I have included a screenshot where I am trying to select content type = “Friday Links” and… I really have absolutely no idea what to do next. I don’t understand the D8 equivalences (eg. Specifically, I am trying to understand how the data selectors work. There is zero documentation online - at least, there is but it leads to blank pages, for example… … Or there is this which is linked from the Rules module on my site: but, like as that commenter have said, it just doesn’t make any sense in D8. isExternal() -> is link to outside (ie.Has anyone had any experience with Rules in D8? I used it extensively in D7, but I am finding the D8 version impossible to make sense of.You can access this object also by using this line below, from within that's node template file: content.field_link (this is also Drupal\Core\Url object) Tab.field_tab_link.getUrl() a Drupal\Core\Url object. Then you can access what's most interesting: It's better to acess Drupal\link\Plugin\Field\FieldType\LinkItem by: A hydrogen leak during qualification testing of a United Launch Alliance (ULA) Vulcan rocket upper stage was not due. Tab.field_link.uri -> the URI (URI is not URL) ULA Rules Out Test Rig As Source Of Centaur V Leak. If you got the node by drupal_entity (Twig Tweaks) then you have: (I'll use "tab" as that node) tab.field_link If you want the URL (and title) that is in a field you have to get to object of class: Hehe, this is the shit in terms of getting URL from field (Twig version of getting that URL) With the relaxation of travel requirements around the world, were thrilled to welcome all guests back on our ships to cruise freely to the places theyve. Unfortunately, this method is marked as so you are not supposed to use it in user code (ie. $url = $this->url_generator->generateFromRoute('',, $options) Your can replace the static method with a call to UrlGeneratorInterface::generateFromRoute() on the url_generator service.

The static method is not easily testable, $url->toString() require an initialized container. $url = \Drupal\Core\Url::fromRoute('',, $options) To get the URL as a string, you need to call its toString() method.

\Drupal\Core\Url::fromRoute() will not return a string, but an object. In your case, the route to use is the canonical route for a node entity:. Drupal 8 uses routes which have name different from their actual URL path. You need to use the \Drupal\Core\Url class, specifically its fromRoute static method.
