[SOLVED] How do I make a custom module trigger a function when content is unpublished?

In short:

Utilizing Drupal 8, I'm hoping to to "hook" into an entity update event for a specific content type so that I can then take further action when that event occurs. In this case, delete the node if it's unpublished.

In long:

The Scheduler module allows scheduling of nodes to publish and unpublish as scheduled. My goal is to then delete a specific-type node when it gets unpublished.

Drupal 8 draggable table error

Hello everyone,
I have been trying to get draggable table items working in Drupal 8 for a bit now and my current error happens whenever I drag one of the rows. The error is 'Cannot read property 'relationship' of undefined'. It is a Javascript error. I have no idea why the draggable table is throwing this error. Any help would be wonderful. Here is my current drupal 8 form:

How to configure single sign on?

Has anyone done single sign on with Acquia hosting? We're trying to implement SSO using shibboleth with Drupal 8 hosted on Acquia. Any pointers is much appreciated.

external embedded images not displaying d8

On this page I am trying to embed an external image using code provided by airbnb. - http://bnb.ferniesnowvalley.ca/about/ferniebnb You will see the text is coming through, but the image is not.

I have the full html input format on, and all filters turned off.

Anyone have any ideas how to get the images to appear?

this is the code provided by airbnb

How do I select a non default value from a Node object structure?

When I select field_upload field by Node::load(10)->field_upload, it always selects the x-default. How do I select the fr instead of the default?

["field_upload"]=> array(2) { ["x-default"]=> array(1) { [0]=> array(3) { ["target_id"]=> string(4) "1280" ["display"]=> string(1) "1" ["description"]=> string(0) "" } } ["fr"]=> array(1) { [0]=> array(3) { ["target_id"]=> string(4) "1281" ["display"]=> string(1) "1" ["description"]=> string(0) "" } } }

D8, derivatives and constraints

Hi,

I'm always on derivatives and try to create some routes to add tabs on entity pages.
For example, I build a new tab on any node page to list entities from my module.

Now I try to limit my tabs only on specific bundles. Ie: I build a settings form to display entity types and attached bundles, one checkbox for each bundle.
I selected node:article and user:user. I can retrieve my settings in my derivative class, but I don't know how to restrict derivatives routes to only selected bundles.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x