8 – How to restrict access to view a block for a certain role?

The basis of the role visibility block is an integrated functionality of Drupal 8.

go to admin/structure/block and click on your desire block configure button

enter description of image here

then in the Visibility section there is Role that you can define for which role your module will display or not.

enter description of image here

8 – Is a block rendering table built with EntityViewBuilderInterface :: view supposed to make the block model complete or only the internal fields?

After making the custom blocks in the templates, I got this js error: Quick edit could not match the markup of the rendered entity field. What I have done so far:

In order to repeatedly render custom blocks in models, I wrote this function in mytheme.theme :

function render_block_in_template($block_id) {
  // $block = Drupal::entityTypeManager()->getStorage('block_content')->load($block_id);
  $block = Drupalblock_contentEntityBlockContent::load($block_id);

  if(!empty($block)) {
    $block_content = Drupal::entityTypeManager()
      ->getViewBuilder('block_content')
      ->view($block);

    if($block_content) {
      // kint($block_content);
      return $block_content;
    }
  }
}

And I call it mytheme_preprocess_node :

function mytheme_preprocess_node(&$variables) {
  $node = $variables('node');

  if($node->bundle() == 'some_bundle') {
    $variables('some_block') = render_block_in_template(12);
    $variables('some_other_block') = render_block_in_template(13);
    // ...
  }
}

Then I make the blocks node--some-bundle.html.twig :

{{ some_block }}
{{ some_other_block }}

So far so good. But I got this js error from quickedit.js:

Error: Quick edit could not associate markup of the rendered entity field
(with (data-quickedit-field-id="block_content/12/body/fr/full")) with
the corresponding entity markup: no parent DOM node found
with (data-quickedit-entity-id="block_content/12"). Itโ€™s typically
caused by the theme template for this type of entity forgetting to
print the attributes.

Which led me to this problem: the custom block layout creation module does not work – Quick Edit could not associate the markup of the rendered entity field, but the Applying the fix hasn't changed anything, and further reading makes me think that it's not exactly related.

If I {{ kint(some_block) }} in twig, the #attributes key with expected values โ€‹โ€‹is here:

enter description of image here

and here is the HTML output:

// FIELD CONTENT

Finally, wrapping it manually with the following eliminates the error:

So it seems that the above packaging part of the block model is not rendered, only the fields are rendered and this causes the error.

Is there actually a bug or am I doing things wrong?

macos – Add bad blocks to bad block file in HFS +

I have a reader that seems to have bad blocks: sometimes reading or writing will cause Finder / Terminal / to hang regardless of the application that is using the reader. I read that I can use "badblocks" to scan the drive and produce a list of bad blocks, and I also read that there is a "bad block file" in HFS +, which contains a list of bad blocks, and the blocks are included in the allocation file. Is there a way / command to manually add bad blocks to this list?

I posted questions earlier that give more details about the player, but no functional answer is present: Force eject from a device

block editor – Gutenberg CSS Issue

I have the CSS code below but it is not on the post page:

(I'm talking about the font size and color)

/* gutenberg */
blockquote {
    text-align: center;
    margin: 20px;
    font-family: epicride;
    color: red;
    font-size: 90px;
}

wp-block-quote {
    font-size: 90px;
}

This is a page, it works:

http://www.oneclick.deniz-tasarim.site/sample-page/

This one is post, it doesn't work:

http://www.oneclick.deniz-tasarim.site/2020/03/27/best-places-in-africa/

I have CSS below but the font family is not read.

@import url('https://fonts.googleapis.com/css?family=Love+Ya+Like+A+Sister&display=swap');

  figcaption {
    font-size: 30px;
    text-align: center;
    font-family: 'Love Ya Like A Sister', cursive;
      border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
      box-shadow: 20px 38px 34px -26px hsla(0,0%,0%,.2);
      border:solid 2px #41403E;
}
figcaption:hover {
    box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, .3);
}

you can look at the same post page to check it out.

The figcaption code also affects my post plugin on the home page. How can I limit the code control area with the gutenberg element?

the home page: (you will see a black border on the thumbnail)

Home

Thank you

blockchain – How do bitcoin nodes agree to the first person who mined a block?

Once the transactions are broadcast and a node begins to work on a proof of work and finds it, it broadcasts it to all the other nodes so that this block can be checked and added to their blockchain. All the nodes agree to add another transaction which coin a certain amount of bitcoins to the miner.

However, I am confused as to the protections that exist against a Bitcoin node receiving proof of work for a new block that it has not found and then sending that block around as if it were. ; had extracted!

How do the Bitcoin nodes that originally mined a block and how does the Bitcoin system prevent tampering?

magento2 – Unable to remove block from Magento 2 home page

I'm working on the Magento 2 website that someone developed before me. The website has the Ultimo theme.
I am trying to delete a block with a cursor at the top of the home page. In the Ultimate guide, this block is referenced as a static "preface" block (it is located under the navigation bar and just above the content of the page). The actual block has the CSS class "slideshow-wrapper-additional", but in the admin page in Content -> Blocks, there is no block with such a name.

So, should I delete using the admin panel or direct connection via ftp / ssh?

I have Magento 2.2.9 and Ultimo Theme 2.

Theme – Sub-theme adding a prefix to all block machine names

On my site, I have created a sub-theme of a sub-theme using it as a guide to configure this https://www.drupal.org/docs/8/theming-drupal -8 / creating-a-drupal -8-sub-theme-or-sub-theme-of-sub-theme and it works with the transfer of all css / js / regions but for some reason it renames all blocks with the sub-theme prefix.

So, for example, I have a block with a mainnavigation machine name when I install / define the sub-theme by default, it will change this block to theme3_mainnavigation.

I have tried to delete the block and replace it with the same mainnavigation name but I have a problem where a message will appear indicating that this machine name already exists.

Anyone know how to work around this so that the sub-theme uses machine names from already existing names instead of creating a prefix?

Thanks for any help!

Flash Network – What is your opinion on the block size debate?

I have been following Bitcoin for a few years now, and I was wondering what the developers are thinking here about block size right now.

I realize that we can never evolve towards millions of transactions per second on the chain, I understand that – that's why LN etc. is under construction to also maintain the decentralization of Bitcoins while continuing to evolve. But wouldn't that also benefit the Lightning network, that more "deposits" on the chain to LN could be made in one block (imagine a few million users trying to access LN at the same time – the Bitcoins blockchain would be blocked quickly – essentially meaning no deposit in LN for a long time?).

If the block size has been increased to say 10 times (10 MB): I realize that Bitcoin node operators would start to experience problems with storing the fast growing blockchain (more centralization) – but then again , is it really necessary that everyone can execute a knot? Aren't nodes primarily used for miners and programmers?

I realize that validating your own transactions is a great thing, but should that be hindering scaling up on the chain? It is a cutting edge, but I think we have to find a balance. Either way, at 10MB we would be increasing the blockchain by 1.4GB per day, or 500GB per year (assuming the blocks are full), which is a lot. But then again, it's not unusual to see hard drives the size of a few double-digit TB these days – it seems that capacity is on an increasing trend, so maybe decentralization is possible. after all at this size? I'm really curious to hear more arguments against increasing the size of the blocks, now that a few years have passed since the big boom ๐Ÿ™‚

How to disable / block the Microsoft Store on Windows 10 Pro by firewall?

I want to block Microsoft Store on Windows 10 pro in a corporate environment. After reading relevant articles on this subject and tested on my machine, I find that Windows 10 Pro does not support this function (whether via group policy (not recommended by my manager) or the registry.

Now, I opt for another solution, that is to say block it by a firewall. If possible, can someone show me the Microsoft Store firewall blocking rules? I am using a tool to configure this rule.

block editor – custom wordpress gutenberg URL popover options

So basically I want a link to be only clickable / active on the mobile display window. I have CSS that works, but it's just implementing it now. So I think there are 2 options for this:

Option 1:
The way I see it is that I could create a new button on the editor format toolbar with the same functionality as the link insert button, but in the custom button, it has a class.

Option 2:
or the other way could be to add another toggle option to be able to add a class to the current url popover. I have seen this in some plugins. I just don't know how to do it.

Any advice would be helpful.

also has a picture to explain it better.

enter description of image here