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

img src adding quotes and spaces when rendered D9

Drupal 9

I'm creating a drupal module that calls a php file to render an image.

current code:

$callphp .= '<img src="/path/path/path/test.php?a=0065&b=15>';

$output .= t($callphp);

return $output

the file is never called so I checked the elements in the browser and spaces and quotes are being added to look like:

<img src=" path path path test.php?a="0065&b=15">

I run a clean install of Open Social and get this when finally visitng the website.

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "post_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 143 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Double submit in a custom form

Hi, I have written a custom form and I would like to insert a double button to submit.
The first they call it submit1 and the second submit2
The first has to call me the function

public function submitForm(array &$form, FormStateInterface $form_state) {

and the second

public function submit1Form(array &$form, FormStateInterface $form_state) {

It's possible?

Styling a paragraph link field

Hi,

I am quite new to Drupal and was looking for some help with Paragraphs and Twig templates.

I've got a Paragraph link field I am trying to add some styling to by altering the Twig template. The Paragraph name is ms_useful_resources and the field name is field_ms_links_multi.

I've created a twig template called paragraph--ms-useful-resources.html.twig which has this code:

commerce smart import - category and subcategory with same name child we are having try to import not working

Hi,

I am a Drupal developer, I am facing a challenge in the "Commerce Smart Import-Module". Importing category and subcategory with same name of subcategory we need to use that time we try to import it's not supported, even with category we specified also.

Details are given below, we are using:

Drupal version: 9.3

Commerce  Smart import - module :^1.0@alpha

Apache & php : 8.1 version

Mysql :10 version

Eg:

Multiple taxonomy hierarchy:

-Car
--Brakes
--Cover
--Seats

How to set cache to a json response

Hi team

I have an issue, i would like to know how to set cache to a json response,

I've created this controller and i've tried this:
 

Pages

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