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

Help figuring out "undefined function" (PHP)

I am new to OO PHP. I get this error message (I am trying to upgrade the Notify project to D9):

"Error: Call to undefined function Drupal\notify\Form\getCount() in Drupal\notify\Form\QueueForm->buildForm() (line 156 of modules/contrib/notify/src/Form/QueueForm.php)"

The call is made from inside the public function buildForm that is in class QueueForm extends ConfigFormBase in a file named "QueueForm.php", and looks like this:

How to redirect in HOOK_form_alter in some conditions

I'm working on a module that performs some tasks related to content translation at creation/edition of nodes.

I want to prevent some users to edit in particular languages. If current editing language is not the good one I would like to reload page with the appropriate language (i.e. send user to /node/edit/10 if he is on /LANG/node/edit/10).

Is it possible from within my HOOK_form_alter()? Returning a redirectResponse() have no effect (which is logical).

Is there any other way?

Thanks.

Changing featured images size?

Using Olivero for a personal site, whenever I look at another option I always go back to Olivero. It has that something...

Someone knows if there is any option though, inside Drupal, where I can change the size of the tiny featured images? The only option I thought of was to edit theme code. But, asked this first, as there are a lot of settings on Drupal admin, to be shure. Thank you in advance.

SQL injection- SQL stack trace on page

Displaying SQL stack trace on front end page during security scan

Detailed stack trace-

Slow Ajax Solution

Introduction: I was struggling with slow ajax requests in a custom module form.  Since I couldn't find any good resources I wanted to share my solution.

SQL stack trace displayed by manipulating cookie content

How can we avoid displaying sql stack trace on page

SQL stack trace on page-

Pages

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