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

Loading Entities from an Second Read-Only Database

So I have a module that provides a slimmed down Render Array into a JSON object to a caching server, that then sends the information to a front-end Symfony Servers.

I would like to scale my database horizontality with either a Read Replica or a Azure Cluster. I thought I could accomplish this since all my production workloads goes through my custom module. But I can’t seem to figure out how to get Drupal Core or Entities modules (like Node::load(id)) to read from the second database instance.

Where does Drupal7 save the "Path of the public files" ? (SOLVED)

Hi,

I'm building a template of the database of a Drupal7 site that I want to modify with a script.

I'd like to modify the location of "Path of the public files" and "Path of the private files", but I can't find them in the database.

On the backend these two configurations are in: Home-->Administration-->Configuration-->Media.

Where does Drupal save these two configurations?

Thank you very much

Claudio

dependent field with _form_alter

Hello every I want create classifieds website with drupal 8

I have create content type call cars. I have two fields call Car Brands and Car Models

I want Car Models to be dependent of car brands. eg if you select Kia from car brands you only see Kia cars under the Car Model

Here is my code of my model.

<?php

function changedata_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {

if ($form_id == 'node_car_form') {

$model_options = $form['field_car_brand']['widget'][0]['value']['#value'];

Can i Use url embed module to add complex Iframe

Hi,

Need to add a complex Iframe to my drupal 8 site and tried iframe module but that's not rich enough, to contain the Iframe I need.

Iframe url =

hook_theme cached, only run once

I am passing variables that change depending on user role to twig from hook_theme in a .module file .  The problem is that the variables are cached and do not change until cache is cleared, so all users get the variables from the first user viewing the page. 

I have tried to set  '#cache' => ['max-age' => 0,] in the controller, but that does not help.

How can I disable or control caching done in hook_theme ??

What is the differents between Organic Group and Group module at Drupal?

I have checked both Group and OG modules. Both grouped content , audience. But group module structure different.

I have a feature in drupal 7 , developed totally based on Organic Group module. When I am going to migrate it , I found there is no stable version of OG module available in Drupal 8. So I am facing problems. 

Can I use Drupal 8 Group module to implement this feature which is based on OG module in Drupal 7. If I can implement this feature using Group module in Drupal 8, then how can  I migrate all data ? Because both structure totally different. 

Pages

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