8 – Can’t get referenced node to appear in view block

I have recipe and food nodes, and recipe nodes (e.g. My Favourite Cake Recipe) link to parent food types (e.g. Cake). This link is done via a Parent Food content reference field on the recipe node type.

Now I’d like to display a block titled Linked Food next to all recipes. To do this I created a food content view with the following:

  • Add a relationship with item Content referenced from field_parent_food so that I can display the content of the food node referenced from the recipe page I’m viewing.
  • Add a contextual ID filter, and set WHEN THE FILTER VALUE IS NOT AVAILABLE to Provide Default -> Content ID from URL so that I only look at nodes with an ID equal to the current page.
  • Add a field with ID Parent Food so that I display the content of the referenced food.

I then set up this block to display on the recipe content type. When I navigate to a recipe I was now expecting to see the parent food node detailed in the block, but instead I just see the same recipe repeated in the block. What am I doing wrong here?

I’ve had a look at a view tutorials and I’m as someone who is familiar with relational databases I find the concept of views (or at least the documentation) really impenetrable, so I’m just going to ask…

Oracle RAC Node 1 is in mount mode, How to open?

I’m new to Oracle RAC, today I found out that Node 1 is down, but don’t know how to fix. Please help

from SQL*Plus

SQL> select status from v$instance;



from ./crsctl stat res -t

      1        ONLINE  INTERMEDIATE ibmbdb01                 Mounted (Closed)    
      2        ONLINE  ONLINE       ibmbdb02                 Open    

from srvctl status database -d ibmbdb -v

(oracle@ibmbdb01 ~)$ srvctl status database -d ibmbdb -v
Instance ibmbdb1 is running on node ibmbdb01. Instance status: Mounted (Closed).
Instance ibmbdb2 is running on node ibmbdb02. Instance status: Open.

How to interact with bitcoin node and spend from wallets without storing said wallets on the said node it self?

I am working currently on a wallet for a customer

the wallet will be provided to his website users and will hole cryptocurrency

once of the coins he wants supported is BTC

when I researched I didn’t find much docs and as i can see BTC network is way different from ETH

Now my question for exemple on ETH i can hold my addresses and private keys on one server and send transations using my ETH full node ,the ETH full node has no access to my peivate keys

on BTC I only see solutions where the BTC node stores all the wallets and that’s not suitable for me, I wanna keep wallets private keys on a server and only send transactions when i need to using the btc node

can anyone point me to a direction ? what should I use ?

most their backend is in node so javascript libraries will be preferable

client – How does a node send a chain?

I apologize for the newbie question. I understand that in selfish mining a malicious node can “send its entire hidden chain”. Exactly how is this done? I know that usually a single block is broadcast-ed right after it is mined, but how does it relay an entire chain?

I am looking at the original bitcoin protocol https://en.bitcoin.it/wiki/Protocol_documentation#inv
It seems that inv can broadcast many objects. So would a malicious node send an entire chain via one call to inv or many?

8 – Drupal way of storing data related to a node

Create a custom content entity with entity_reference fields relating each “email” entity to a node and a user.

The information you’re saving is neither part of the node’s content nor part of the node’s metadata. It is metadata about an email that has been sent. Since the email records aren’t related to any particular revision of the node, you want the email records to remain even if the node is reverted to a previous revision. So you shouldn’t put the email records in a node field of any kind.

Creating a custom content entity is more useful than creating a custom table, because – as you have pointed out – you can make use of the built-in Entity API, which allows you to add field bundles, but also makes it easy to relate your records to node and user entities, and optionally do cleanup if those users or nodes are deleted. If you generate your custom entity using Drupal Console then it will work out of the box with views.

8 – Node save slow with a field containing lots of paragraphs

I have a node that has a Paragraph field. It has around 80 Paragraphs referenced to it. When I save the node programmatically it’s very slow. It seems like the slow down is happening in the preSave() of the Paragraph field. I’m wondering if every referenced Paragraph is being loaded when the node is being saved? And if so is this normal functionality?

Could it just be bad design by myself that I created a node that has a field with 80+ Paragraphs referenced to it? Or is it legitimate to do it this way?

I should add that the node uses revisions.

security – How to restrict Jenkins node by label for a group of users

The situation

Say I have a Jenkins installations with multi-branch pipelines which executes on nodes which are implemented as ECS Tasks in AWS. The nodes have specific IAM roles which allow to do certain things like access a certain secret. The coded pipelines choose the node dynamically by label. So far so good.

In this setup, Jenkins is connected through LDAP to OpenLDAP and there are groups set up. Permissions are handled through the “role based strategy”

For the blessed branch of the pipelines there are code reviews but in theory any user can create a branch and use the coded pipeline to retrieve the secrets which the node is allowed to read.

In this situation I though the correct way to enforce security is to prevent certain groups to run jobs on certain nodes.

The question

How can I restrict the usage of a certain node for a certain group of users by label ?

What I tried so far

Since I believe the role based strategy can assign group permissions based on the node name and the ECS nodes get their names based on <cluster name>-<random string> I tried to

  • create a cluster with a specific name for the nodes I want to be able to restrict
  • created two groups eg. standard and privileged
  • globally deny “build” permission for standard group
  • allow “build” permission for standard group on nodes named like <non-privileged cluster name>-.*|master|Jenkins

The problem with this is: it didn’t work for master (some non-privileged pipelines need to perform tasks on the master). I got error messages like 'XXXXXXXX' lacks permission to run on 'Jenkins'

8 – How do I add a button with a custom redirect to a node view?

I’d like to add a “More info” button to the bottom of a node view. The button should redirect the user to a URL based on the current node, e.g. node/1/info:

 * Implements hook_node_view
 * Add the "More Info" button to idea content

function implementations_node_view(array &$build, DrupalCoreEntityEntityInterface $entity, DrupalCoreEntityDisplayEntityViewDisplayInterface $display, $view_mode) {

  $build('implementations_addition') = (
    '#type' => 'button',
    '#value' => t('More Info'),
    '#submit' => ('implementations_submit_impl'),
    '#weight' => 1000,
    '#attributes' => (
      'class' => ('btn', 'btn-primary'),
      //'onclick' => "location.href='https://google.com'" # dirty hack I really want to avoid

function implementations_submit_impl(array $form, DrupalCoreFormFormStateInterface $form_state) {
  # just a mock redirect for now
  return new SymfonyComponentHttpFoundationRedirectResponse(DrupalCoreUrl::fromRoute('user.page'));

The above code results in the button correctly appearing, but when I click on it, nothing happens. What am I doing wrong here? Is there a better way?

8 – Canonical URLs per node

I’m trying to find out how to set a canonical url on certen pages/articles on a drupal 8 installation.
Metatag module, have the option for setting the canonical URL but is a general setting not specific for every page/article.

Does anybody know how to solve this?

Thank you!

View inside a node with content from a relationship

I have two content types: Artist and Artwork.
An Artwork has a field called field_artist which relates to the relevant Artist node.
I want to add a view to the Artist node page, so that all artworks of that artist are displayed.

I tried using EVA, but I can’t figure out what relationship and contextual filters to choose. I looked for tutorials but I find this very confusing.

Is there a way to do this with EVA OR in some other easy way? The only crucial thing is that the entity reference field from Artwork to Artist must be used to filter the artworks in the view.