This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Responsive Images, breakpoints, image styles...

I'm playing around with the CSS Aspect Ratio module, and there seems to be a bug.

This code produces always the same result, but it shouldn't:

Jquery.once is deprecated, need help for code rewriting.

core/jQuery.once is being deprecated in core.
https://www.drupal.org/node/3158256
1 Need help rewriting some lines of code using the core/once library.

Old:

  
$('.hub-recettes').find('input').once('recomandation-filter').on('ifChecked ifUnchecked', function (event) {
      $('#views-exposed-form-hub-recette-page-1').submit();
    });

New:

Undefined variable: base_url

 Undefined variable: base_url in WesiteURL_page_alter() (line 182 of /home/kratomus/public_html/sites/all/themes/WebsiteURL_new/template.php).

How can I solved this . Every time a user needs to checkout , they get a server error message saying can not communicate with server .

Any help is appreciated .

uc_greenmoney

01/19/2022 - 09:47

How to display unique nodes for a page?

The scenario is like this: we have a news website, every page display different type of news nodes. We have to set the site in this way that, for a single page, no news node should be duplicate while displaying.

Entity reference in form_alter

In a content type I have an entity reference with an autocomplete field
I need to get the ID of the entity refrerence field inside the form_alter, in modification of the node.
Through the callBack I use this code and I get the ID to be able to upload

$nid = $form_state->getValue('field_richiedente')[0]['target_id'] ;
$node = \Drupal::entityTypeManager()->getStorage('node')->load($nid);

and everything is fine

In form_alter when I modify the node I cannot use the $form_state and I use $form[]

I can't setQuantity in a cart event

Hi everyone,

I have a problem with a setting that should occur in a cart event.

The process is as follows:

When you add a certain type of product, you can choose whether you want to take out cancellation insurance.

Once in the cart, if you delete the product, the insurance is automatically deleted (it works).

If we try to include more insurance than reserved products, the amount of insurance is automatically readjusted to the number of reserved products (it also works).

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions