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

hook_boot in D8 using Event Subscriber

Hi All,

I want to execute an ajax request on page load in D8. (intention to execute some process on page load which I have done using hook_boot in D7, Now I am trying to achieve in Drupal 8.7.6)

I have used event subscriber (refered I have added mymodule.libraries.yml file where I have mentioned about JS file, I have included JS file via hook_preprocess hook in mymodule.module file. 

Redirect user when batch ajax encounters an error

I have a batch and when the operation is running and encountered

"An AJAX HTTP error occurred."

I want to redirect the user to another page and display the errors nicely. How can I do that with D8 batch? 

Thanks in advance!

Clearing the cart before adding the product. Drupal 8 + Commerce 2

I am using Drupal8, Commerce 2, Commerce Recurring and Commerce Licence. 

I am selling yearly subscription.

Issue and Steps

  • User can add subscription product into cart
  • User redirecting to cart page
  • User hits back button and visit product page(subscription page) again.
  • User again add subscription product into cart. 
  • Then user end up with 2 same subscription products into cart. Need to restrict user to add multiple product into cart.

Possible solution:

Bibliography and Cite


I wish to have a bibliography handled as it is in TeX: a bib file somewhere, in the text I call \cite{ref} and a bibliography appears.

\cite{ref} is transfromed into a well formed expression in the text, that it only depends on a key attached to the full reference in the bib file, and the bibliography lets appear only what I have cited.

Any idea of a module doing this?



custom block hook

hello, how can i get the hook of a custom block ? 

Change view filter depending of url origin

Hello , i've a bloc with a link to a view. This bloc is on severals pages. I would like to applied filter on the view depending of the page where the link is clicked. 


Subscribe with RSS Subscribe to RSS - Module Development and Code Questions