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

Need to do a bulk save from draft to published

Is there a way to manipulate the data from Workflows, the archive, draft, published states? Any suggestions on the best way to save 700 nodes from one content type to switch them all from Draft to Published?

How does views update through ajax and how can I replicate this behaviour?

Hi

I have a view, some exposed filters ajax enabled. When I select a filter the view updates through Ajax.

Im struggling to see how this happens?

I'm gussing there is a JS call somewhere can I just call this same js function?

I can build a module where I create my own buttons, but I cant find any information on what I need to call to create the ajax update.

If I disable JS I get a url like ?myfilter=value. Do I just pass this through some JS function?

Thanks for any help on how to get started

WriteOnly/ReadOnly Database - Postgres configuration with Drupal 9

Hi All,

I would like to setup a Drupal with PostgreSQL for writeonly and readonly databases. I have gone through lots of article but something is missing from my side on implementation. I have following configuration in the settings.php file. Do I need any other changes any where else? Mainly would like to implement two database 1) write only (DB1) - All the write queries such as insert, update, delete etc and 2) readonly (DB2) - all the select queries. Will this implementation help me to achieve if DB1 goes down still all the traffic goes to DB2 (ReadOnly)?

Settings.php

Date field in query

In a form I have a date field

$form['data'] = array(
  '#type' => 'date',
  '#title' => 'Data',
  '#default_value' => date('Y-m-d', time()) ,
);

In the submitForm, I put the date in a variable, to be able to use it in the query

$field  = $form_state->getValues();
  $dData = $field['data'];

In the query

How does JSON:API Search API work?

I can't figure out how does JSON:API Search API works?

How can i search by something and get results? There is no documentation on https://www.drupal.org/project/jsonapi_search_api

How do i search after setting up search api and indexs?

/api/search_api_index/search_api_index with json api i can see this page but can't get how do i search for something

Custom mudule and rendering

Hi, I created a form and in the buildForm I define some fields. One of them is a table field ('#type' => 'table')
After choosing the field and pressing the button, I execute some code that updates the table field by adding rows and updating the fields.
At the end I would like to display the result obtained by displaying the table field. But I didn't understand how to do it.
If I put the code in the buidForm everything is fine but I can't choose the date
Is there a system?

Pages

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