Adding a payment button to the Webform Module

I have been administering drupal sites for a while now, but it looks like I need to get into module development for my next clients needs. Specifically I want to add a Pay option to the form, where a person will have to pay before the form gets submitted (there I need to integrate a payment gateway in the form ). Also after the submission is succesfull the person should be registered to the site.

Would appreciate any pointers on how I can achieve the above two goals. I was looking at adding a custom submit handler by using
hook_form_alter() . is that a good path to follow?

ag.algebraic geometry – detecting a semi-free module from its bar-resolution?

Let A be a DG-algebra over a field (say k). A DG-module M over A is said to be semi-free if it admits an exhaustive filtration 0=M0⊂M1⊂…⊂Mp=M such that the cones of Mi→Mi+1 are finite direct sums of shifts of finite dimensional free A-modules (I insist on the finite dimensional hypothesis which I need for my problem).

In case A is proper and M is finite dimensional (perfect?) DG module over A then the bar-resolution of M is an (infinite) semi-free resolution of M.

I am wondering if there is a way to detect that M itself is semi-free from its bar resolution? I am not sure what to expect. Perhaps that one can extract a finite resolution from the bar-resolution when M is semi-free?

Since I am looking for positive result, extra-hypotheses can be made on A. I just don’t want to assume that A is smooth (since in my example it is not).

magento2 – Magento 2.3 – WYSIWYG editor in custom module

So I have successfully created WYSIWYG field in my custom module

Something like this –

    <field name="description" sortOrder="10" formElement="wysiwyg" template="ui/form/field">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">page</item>
                <item name="wysiwygConfigData" xsi:type="array">
                    <item name="is_pagebuilder_enabled" xsi:type="boolean">true</item>
                    <item name="toggle_button" xsi:type="boolean">true</item>
                    <item name="height" xsi:type="string">200px</item>
                    <item name="add_variables" xsi:type="boolean">true</item>
                    <item name="add_widgets" xsi:type="boolean">true</item>
                    <item name="add_images" xsi:type="boolean">true</item>
                    <item name="add_directives" xsi:type="boolean">true</item>
            <label translate="true">Description</label>

Till this everything works – I can see my field and it also has pagebuilder WYSIWYG editor in it, I can add text, rows, heading, etc. But Edit button isn’t working. For example if I add Row and click on edit, then it should open overlay where I can change background, margins/paddings etc, but nothing happens when I click on that Edit button. I saw in console that it shows a lot of warnings about SourceMap missing, maybe it is somehow related? How do I import those js files in my custom module?

Any help appreciated!
Thank you!

computer architecture – What bus DIMM (RAM module) uses?

Thanks for contributing an answer to Computer Science Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

optimus – bbswitch module(external module) does not survive kernel upgrades

Here is how I Installed bbswitch for turning my dGPU off…and it used to work flawlessly:

(0) blacklist - uninstall nouveau
(1) xbps-install -S bbswitch
(2) nano -w /etc/modprobe.d/bbswitch.conf
    options bbswitch load_state=0 unload_state=1
(3) nano -w /etc/modules-load.d/bbswitch.conf
(4) search /lib/modules/ to see which kernel has bbswitch
(5) install the kernel in step (4) 
(6) depmod -a
(7) xbps-reconfigure --force linuxX.Y
(8) cat /proc/acpi/bbswitch <-----this reported that dGPU is off

However during a kernel upgrade, this happens:

What is wrong here ?

Another thing, When I installed bbswitch for the first time, bbswitch.ko was in /etc/modules/’version’

but now it is not there….

can someone tell me what is going on ?

hooks – Properly override template_preprocess_book_navigation function in Drupal 8 Book module

I’m trying to find what is the proper way to override the template_preprocess_book_navigation function from the Drupal 8’s core Book module. I want to add only two lines (bolded), but don’t know how this should be done in “Drupal 8 way”. Should I create a custom module or add something in the mytheme.theme file?

Thank you and be healthy!

function template_preprocess_book_navigation(&$variables) {
  $book_link = $variables('book_link');

  // Provide extra variables for themers. Not needed by default.
  $variables('book_id') = $book_link('bid');
  $variables('book_title') = $book_link('link_title');
  $variables('book_url') = Url::fromRoute('entity.node.canonical', ('node' => $book_link('bid')))->toString();
  $variables('current_depth') = $book_link('depth');
  $variables('tree') = '';

  /** @var DrupalbookBookOutline $book_outline */
  $book_outline = Drupal::service('book.outline');

  if ($book_link('nid')) {
    $variables('tree') = $book_outline->childrenLinks($book_link);

    $build = ();

    if ($prev = $book_outline->prevLink($book_link)) {
      $prev_href = Url::fromRoute('entity.node.canonical', ('node' => $prev('nid')))->toString();
      $build('#attached')('html_head_link')()() = (
        'rel' => 'prev',
        'href' => $prev_href,
      $variables('prev_url') = $prev_href;
      $variables('prev_title') = $prev('title');

    /** @var DrupalbookBookManagerInterface $book_manager */
    $book_manager = Drupal::service('book.manager');
    if ($book_link('pid') && $parent = $book_manager->loadBookLink($book_link('pid'))) {
      $parent_href = Url::fromRoute('entity.node.canonical', ('node' => $book_link('pid')))->toString();
      $build('#attached')('html_head_link')()() = (
        'rel' => 'up',
        'href' => $parent_href,
      $variables('parent_url') = $parent_href;
      $variables('parent_title') = $parent('title');
      $variables('prev_depth') = $prev('depth');

    if ($next = $book_outline->nextLink($book_link)) {
      $next_href = Url::fromRoute('entity.node.canonical', ('node' => $next('nid')))->toString();
      $build('#attached')('html_head_link')()() = (
        'rel' => 'next',
        'href' => $next_href,
      $variables('next_url') = $next_href;
      $variables('next_title') = $next('title');
      $variables('next_depth') = $next('depth');

  if (!empty($build)) {

  $variables('has_links') = FALSE;
  // Link variables to filter for values and set state of the flag variable.
  $links = ('prev_url', 'prev_title', 'parent_url', 'parent_title', 'next_url', 'next_title');
  foreach ($links as $link) {
    if (isset($variables($link))) {
      // Flag when there is a value.
      $variables('has_links') = TRUE;
    else {
      // Set empty to prevent notices.
      $variables($link) = '';

Will I have a problem developing my module using a zip installation?

I’m trying to create and learn how to develop a module for Magento 2. The problem is that installation through the composer is too dependent on handling, is necessary to install and enable, and uses too much for each installation of the operating system. I chose to do the installation via zip file, while the resolved one removes the installation via composer. My question is whether my module can stop working when I use a compositor installation.

navigation – Build out a complete main nav menu for a module – not just adding one menu link

I’ve been finding a lot of info about how to add a menu link as part of a module. That works fine using the route/controller & file.

But I am now trying to figure out how to add a complete main menu for my module (my module is a default data & structure module).

My goal is to have x level-1 menu items and each one of those will have varying numbers of sub-menus.

Any hints or references to guides/tutorials would be very much appreciated!