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

Locking mechanism does not seem to be working... any idea what could be wrong?

I run the following code in Devel:

$lock = \Drupal::lock();
if ($lock->acquire('PV_Counter'))
   {
   print_r('I hold and will not release the lock named PV_Counter');
   // Code to use next counter and increment it
   // ...
   //$lock->release('PV_Counter');}
else
   {
     print_r('I do not hold the lock');
   }

Then my colleague runs the same code in Devel on the same Drupal site.

User logged out after redirect back from Payment Provider (Qenta)

Good day everyone.

I am currently working on a payment process of a Drupal 10 application using Qenta. The payment process is initialized by setting #action inside buildForm of a form class to the payment-process-init-url of Qenta. The payment process works correctly but after Qenta redirects back to the Drupal 10 application using the provided successUrl the user is logged out even though the session cookie is still alive if I look into the developer tools of my browser (Chrome 120).

Deprecated method stopPropagation() in drupal 10

While upgrading from drupal 9 to drupal 10 i am getting error as call to deprecated function stopPropagation() , i would like to know how can i fix this error.

Try number 2 still crapping out. WTF? Not even the drush version will run without throwing exceptions. Why is this so F'ing diff

Nevermind. Thank god for ChatGPT. It fixed it and rewrote the whole thing and it works fine now.

Jesus christ this is absurd.  So I got some actual help from folks on the Reddit Drupal site and I started over.  I now have created a completely green test module use the "drush generate" command. Here is where I am at:

Trying to get started and dying a little bit inside to include a class file in my module

It's been a long time since I've had to write some custom code for a module and the changes in 10 seem to be pretty profound. So here is where I'm at:

beechbooker.routing.yml:

beechbooker.cabincalendar:
  path: '/cabincalendar'
  defaults:
    _controller: '\Drupal\beechbooker\Controller\BeechBookerController::CabinCalendar'
    _title: 'The Cabin Calendar'
  requirements:
    _permission: 'access content'

beechbooker.mdoule:

 

Conditions for block-content within layout-builder

Hi,

I migrated my side from Drupal 7 to drupal 10. In drupal 7 I used panels with  blocks. And build 2 blocks with condition urls' to show the block.

Now in drupal 10 I have a layout for the vocabulary
If I want to show different content in a block by a term, is this possible somehow? Or do I need to add all blocks with condition url's to the lay-out? And then because of the condition in the block, it shows itself like in Drupal 7?

Pages

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